/[gzz]/gzz/test/gzz/vob/bgvobs.test
ViewVC logotype

Diff of /gzz/test/gzz/vob/bgvobs.test

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by humppake, Thu Nov 28 07:18:08 2002 UTC revision 1.3 by humppake, Thu Dec 12 09:42:20 2002 UTC
# Line 50  def testFilledRectVob(): Line 50  def testFilledRectVob():
50    
51      checkNotAvgColor(140, 140, 20, 20, (255, 0, 0), delta=1)      checkNotAvgColor(140, 140, 20, 20, (255, 0, 0), delta=1)
52    
53    def testSolidBgVob():
54        """Tests that SolidBgVob is drawn with wanted color, and after
55           that the default color is black. """
56    
57        sty1 = win.getGraphicsAPI().getTextStyle("SansSerif", 0, 20)
58    
59        vs = getvs()
60        size = vs.getSize()
61        vs.map.put(gzz.vob.vobs.SolidBgVob(Color.black))
62    
63        textvob = gzz.vob.vobs.TextVob(sty1, "XXXXXX")
64    
65        text_width = int(textvob.getWidth(1))
66        text_height = int(textvob.getHeight(1))
67        text_depth = int(textvob.getDepth(1))
68    
69        cs = vs.orthoBoxCS(0, "window",  0, 100, 100, 1, 1, size.width, size.height)
70        cs_text = vs.orthoCS(cs, "text", 0, 0, 0, text_height + text_depth, text_height + text_depth)
71        vs.map.put(textvob, cs_text)
72        render(vs)
73    
74        checkAvgColor(100, 100, text_width, text_height+text_depth, (0, 0, 0), delta=1)
75    
76  def testOvalbgVob():  def testOvalbgVob():
77      """Tests that OvalBgVob is drawn correctly using box CS.      """Tests that OvalBgVob is drawn correctly using box CS.
78      """      """

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26