/[gzz]/gzz/test/gzz/gfx/gl/glvobcoorder.test
ViewVC logotype

Diff of /gzz/test/gzz/gfx/gl/glvobcoorder.test

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

revision 1.25 by humppake, Wed Nov 20 15:08:22 2002 UTC revision 1.26 by humppake, Wed Nov 20 17:23:50 2002 UTC
# Line 273  def testCulling(): Line 273  def testCulling():
273      putThings()      putThings()
274      checkAvgColor(10, 10, 80, 80, (255, 0, 0), delta=50)      checkAvgColor(10, 10, 80, 80, (255, 0, 0), delta=50)
275    
 def testTextVob():  
     from gzz.client import GraphicsAPI  
     from java.awt import Font  
     style = GraphicsAPI.getInstance().getTextStyle("SansSerif", Font.PLAIN, 10)  
   
     size = vs.getSize()  
     def putThings():  
         vs.map.clear()  
         vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red))  
         vs.map.put(textvob, cs_text)  
         render(vs)  
     textvob = gzz.vob.vobs.TextVob(style, "[XXXXX]")  
     text_size = 50  
     text_scale = style.getScaleByHeight(text_size)  
     text_width = int(textvob.getWidth(text_scale))  
     text_height = int(textvob.getHeight(text_scale))  
   
     cs = c.orthoBox(0, 0, 100, 100, 1, 1, size.width, size.height)  
     cs_text = c.ortho(cs, 0, 0, 0, text_size, text_size)  
     putThings()  
     checkNotAvgColor(100, 100, 100+text_width, 100+text_height, (255, 0, 0), delta=5)  
   
     cs = c.ortho(0, 0, 100, 100, size.width, size.height)  
     cs_text = c.ortho(cs, 0, 0, 0, text_size, text_size)  
     putThings()  
     checkNotAvgColor(100, 100, 100+text_width, 100+text_height, (255, 0, 0), delta=5)  
   
     cs = c.affineCoordsys(0, 0, 100, 100, size.width, 0, 0, size.height)  
     cs_text = c.ortho(cs, 0, 0, 0, text_size, text_size)  
     putThings()  
     checkNotAvgColor(100, 100, 100+text_width, 100+text_height, (255, 0, 0), delta=5)  
   
   
276  # : vim: set syntax=python :  # : vim: set syntax=python :

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

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