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

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

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

revision 1.10 by jvk, Mon Mar 31 11:27:54 2003 UTC revision 1.11 by jvk, Mon Mar 31 12:47:41 2003 UTC
# Line 122  def paperOnce2(vs, into, layout, scale): Line 122  def paperOnce2(vs, into, layout, scale):
122                         pap_s, 0, 0, pap_s)                         pap_s, 0, 0, pap_s)
123      layout.place(vs, into, 1, 1, -1)      layout.place(vs, into, 1, 1, -1)
124    
125    class OptMill2(gzz.gfx.gl.PaperMill):
126        def __init__(self, mill):
127            self.mill = mill
128        def getPaper(self,seed):
129            print "GETPAPER",args
130            return gfx.libpaper.papermill.ThePaperMill().getPaper(seed, minlum=60)
131        def getOptimizedPaper(self, seed, w):
132            return gfx.libpaper.papermill.ThePaperMill().getOptimizedPaper(seed, w, minlum=60)
133    
134  def doFrame(s,width,height):  def doFrame(s,width,height):
135      global frame      global frame
136      global paperOnce      global paperOnce
# Line 134  def doFrame(s,width,height): Line 143  def doFrame(s,width,height):
143                         w=int(width+.5),                         w=int(width+.5),
144                         h=int(height+.5))                         h=int(height+.5))
145      saveanim.saveframe("/tmp/bleaching%iz.png" % frame, w,      saveanim.saveframe("/tmp/bleaching%iz.png" % frame, w,
146                         x=int(width*.95+.5),                         x=int(width*.9+.5),
147                         w=int(width*.05+.5),                         w=int(width*.1+.5),
148                         h=int(height*.25+.5))                         h=int(height*.5+.5))
149      frame += 1      frame += 1
150      paperOnce = tmp      paperOnce = tmp
151    
152  def makeScreenshots(scene, key):  def makeScreenshots(scene, key):
153        #from gfx.libpaper.papermill import ThePaperMill
154        
155      enfMaker = gzz.media.impl.Enfilade1DImpl.Enfilade1DImplMaker()      enfMaker = gzz.media.impl.Enfilade1DImpl.Enfilade1DImplMaker()
156      textblock = "011CA01BE52823106ED33F2C086FF8E7CCF9921A8D"      textblock = "011CA01BE52823106ED33F2C086FF8E7CCF9921A8D"
157      textblock = "01F8C8A93BE231D1CAC9C9C9AC79D130246B287298"      textblock = "01F8C8A93BE231D1CAC9C9C9AC79D130246B287298"
# Line 152  def makeScreenshots(scene, key): Line 163  def makeScreenshots(scene, key):
163      pages = [enfMaker.makeEnfilade(current.subSpan(i, i+1)) for i in range(0, current.length())]      pages = [enfMaker.makeEnfilade(current.subSpan(i, i+1)) for i in range(0, current.length())]
164    
165      s = Scene()      s = Scene()
166      gzz.gfx.gl.PageSpanPaper.paperMill = gzz.gfx.gl.PaperMill.getInstance()          gzz.gfx.gl.PageSpanPaper.paperMill = OptMill2(gzz.gfx.gl.PaperMill.getInstance())
167      global frame,pap_x,pap_y,pap_s      global frame,pap_x,pap_y,pap_s
168      frame = 0      frame = 0
169    
170      pap_x,pap_y, = -100, -400      pap_x,pap_y, = -100, -400
171      xs,ys        = 270, 70      xs,ys        = 135, 35
172    
173      zoom0,zoom1,zoom2 = 1.0, 1.5, 2.25      zoom0,zoom1,zoom2 = 1.0, 1.5, 2.25
174            

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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