/[gzz]/gzz/gfx/demo/papertest.py
ViewVC logotype

Diff of /gzz/gfx/demo/papertest.py

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

revision 1.33 by jvk, Thu Oct 3 16:12:11 2002 UTC revision 1.34 by jvk, Mon Oct 7 10:15:09 2002 UTC
# Line 172  class PaperScene: Line 172  class PaperScene:
172          print "Seed: ",self.seed," pq ",self.pq          print "Seed: ",self.seed," pq ",self.pq
173          vs.map.put(self.pq, cs1, cs2)          vs.map.put(self.pq, cs1, cs2)
174    
175          putText(vs, cs1, str(self.seed), color=(0,0,0), x=-1, y=-1, w=.0025, h=.0025)          putText(vs, cs1, str(self.seed), color=(0,0,0), x=-1, y=-1, w=.085, h=.08)
176    
177          if self.renderPaper:          if self.renderPaper:
178              putnoc(vs, getDList("""              putnoc(vs, getDList("""
# Line 266  class MultiPaperScene: Line 266  class MultiPaperScene:
266              vs.matcher.add(cs1[i], str(i))              vs.matcher.add(cs1[i], str(i))
267                            
268              vs.map.put(self.pq[i], cs1[i], cs2)              vs.map.put(self.pq[i], cs1[i], cs2)
269              putText(vs, cs1[i], str(self.seed + i), color=(0,0,0), x=-1,y=1,z=-1,w=.01, h=.01)              putText(vs, cs1[i], str(self.seed + i), color=(0,0,0), x=-1,y=1,z=-1,w=.32, h=.32)
270    
271          dobenchmark(w, vs)          dobenchmark(w, vs)
272    
   
 def getText(text, x = 0, y = 0, z = 2, w = 1, h = 1):  
     return GLRen.createHorizText(getFont(), text, x, y, z,  w,h)  
   
 def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 2, w = 1, h = 1):  
     if color != None:      
         putnoc(vs, getDListNocoords("Color " + js(color)))  
     putnoc(vs, getDListNocoords("""  
         PushAttrib ENABLE_BIT  
         Disable ALPHA_TEST  
         Disable DEPTH_TEST  
         Enable TEXTURE_2D  
         Enable BLEND  
         BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA  
     """))  
   
     t = getText(text, x, y, z, w, h)  
     vs.map.put(t, cs1)  
       
     putnoc(vs, getDListNocoords("""  
         PopAttrib  
     """))  
   
   
273  class ColorMapScene:  class ColorMapScene:
274      def __init__(self):      def __init__(self):
275          self.bgcolor = (0,0,0)          self.bgcolor = (0,0,0)
# Line 341  class DummyScene: Line 317  class DummyScene:
317          cs1 = vs.coords.affineCoordsys(0, 10, 600, 500, 450, 0, 0, 450)          cs1 = vs.coords.affineCoordsys(0, 10, 600, 500, 450, 0, 0, 450)
318          vs.matcher.add(cs1, "1")          vs.matcher.add(cs1, "1")
319    
320          putText(vs, cs1, "F1, F2", color=(0,0,0), w=.005, h=.005)          putText(vs, cs1, "F1, F2", color=(0,0,0), w=.16, h=.16)
321    
322    
323    

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

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