/[libvob]/libvob/org/nongnu/libvob/vobs/textvob.test
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/vobs/textvob.test

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

revision 1.1 by mudyc, Mon Sep 8 04:35:13 2003 UTC revision 1.2 by mudyc, Mon Sep 8 07:32:47 2003 UTC
# Line 76  def testWH(): Line 76  def testWH():
76          """The bottom side."""          """The bottom side."""
77          checkAvgColor(100, 100+text_height+text_depth+10, text_width, 10, (255, 0, 0), delta=1)          checkAvgColor(100, 100+text_height+text_depth+10, text_width, 10, (255, 0, 0), delta=1)
78    
79    def testEmpty():
80        """ Empty string has been found to jam the machine elsewhere.
81        This test convinces that the problem isn't in TextVob.
82        """
83        text_scale = 1
84        vs = getvs()
85        size = vs.getSize()
86        vs.map.put(vob.vobs.SolidBackdropVob(Color.red))
87        textvob = vob.vobs.TextVob(sty1, None)
88        
89        text_width = int(textvob.getWidth(text_scale))
90        text_height = int(textvob.getHeight(text_scale))
91        text_depth = int(textvob.getDepth(text_scale))
92        
93        cs = vs.orthoBoxCS(0, "window",  0, 100, 100, 1, 1, size.width, size.height)
94        cs_text = vs.orthoCS(cs, "text", 0, 0, 0, text_height + text_depth, text_height + text_depth)
95        vs.map.put(textvob, cs_text)
96        render(vs)
97    
98    
99    
100    
101  # : vim: set syntax=python :  # : vim: set syntax=python :

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

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