/[fenfire]/fenfire/org/fenfire/util/pagespanpaper.test
ViewVC logotype

Diff of /fenfire/org/fenfire/util/pagespanpaper.test

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

revision 1.1 by tjl, Wed Mar 26 18:15:10 2003 UTC revision 1.2 by tjl, Wed Mar 26 19:10:10 2003 UTC
# Line 67  def excinfo(): Line 67  def excinfo():
67  def checkColors():  def checkColors():
68      try:      try:
69          # Check that the green rectangle is there          # Check that the green rectangle is there
70          checkAvgColor(160,150,50,50, (0, 255, 0), delta=110)          gfx.checkAvgColor(160,150,50,50, (0, 255, 0), delta=110)
71          # Check that the red rectangle is there          # Check that the red rectangle is there
72          checkAvgColor(260,150,50,50, (255, 0, 0), delta=110)          gfx.checkAvgColor(260,150,50,50, (255, 0, 0), delta=110)
73          # Check that the black rectangle is there          # Check that the black rectangle is there
74          checkAvgColor(150,225,20,50, (0, 0, 0))          gfx.checkAvgColor(150,225,20,50, (0, 0, 0))
75          checkAvgColor(330,225,20,50, (0, 0, 0))          gfx.checkAvgColor(330,225,20,50, (0, 0, 0))
76    
77          # Check that the border is yellow          # Check that the border is yellow
78          checkAvgColor(45, 0, 2, 500, (255, 255, 0))          gfx.checkAvgColor(45, 0, 2, 500, (255, 255, 0))
79          checkAvgColor(453, 0, 2, 500, (255, 255, 0))          gfx.checkAvgColor(453, 0, 2, 500, (255, 255, 0))
80      except:      except:
81          excinfo()          excinfo()
82          return 0          return 0
83      return 1      return 1
84    
85  def checkNonBlank():  def checkNonBlank():
86      checkNotAvgColor(100, 100, 3, 20, (255, 255, 255))      gfx.checkNotAvgColor(100, 100, 3, 20, (255, 255, 255))
87    
88  def checkBlank():  def checkBlank():
89      checkAvgColor(100, 100, 3, 20, (255, 255, 255))      gfx.checkAvgColor(100, 100, 3, 20, (255, 255, 255))
90    
91  def checkPaper(blank):  def checkPaper(blank):
92    
# Line 95  def checkPaper(blank): Line 95  def checkPaper(blank):
95    
96      pap = p.getPaper(not blank)      pap = p.getPaper(not blank)
97    
98      vs = getvs()      vs = gfx.getvs()
99      vs.map.put(vob.vobs.SolidBackdropVob(Color.yellow))      vs.map.put(vob.vobs.SolidBackdropVob(java.awt.Color.yellow))
100    
101      pcs = vs.orthoCS(0, "A", 0, 50, 50, 400.0 / p.w, 400.0 / p.h)      pcs = vs.orthoCS(0, "A", 0, 50, 50, 400.0 / p.w, 400.0 / p.h)
102      vs.map.put(      vs.map.put(
# Line 106  def checkPaper(blank): Line 106  def checkPaper(blank):
106      for i in range(0, 30):      for i in range(0, 30):
107          pagespan.getTexture(1, 5000)          pagespan.getTexture(1, 5000)
108          for j in range(0, 20):          for j in range(0, 20):
109              gzz.client.AbstractUpdateManager.tickIdle()              vob.AbstractUpdateManager.tickIdle()
110          render(vs)          gfx.render(vs)
111    
112          # check the rendered image's color          # check the rendered image's color
113          if checkColors():          if checkColors():

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