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

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

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

revision 1.23 by tjl, Fri Sep 27 09:48:17 2002 UTC revision 1.24 by tjl, Fri Sep 27 09:53:22 2002 UTC
# Line 9  screensize = (1024, 768) # assuming XGA Line 9  screensize = (1024, 768) # assuming XGA
9  screenctr = (0.9 * screensize[0]/2, screensize[1]/2)  screenctr = (0.9 * screensize[0]/2, screensize[1]/2)
10    
11  # Slow animation for the demo.  # Slow animation for the demo.
12  AbstractUpdateManager.defaultAnimationTime = 3000  AbstractUpdateManager.defaultAnimationTime = 2000
13  AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator()  AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator()
14    
15  from test.tools import tools  from test.tools import tools
# Line 365  class XuPDFScene_PDFContext: Line 365  class XuPDFScene_PDFContext:
365    
366  class XuPDFScene_PDFZoom:  class XuPDFScene_PDFZoom:
367      def __init__(self):      def __init__(self):
368          self.mag = [10, 0.4]          self.mag = [(screensize[1]/2,screensize[1]/2),(screensize[1]*2,20)]
369      def key(self, key):      def key(self, key):
370          print "Key: ",key          print "Key: ",key
371          global currentScene          global currentScene
# Line 390  class XuPDFScene_PDFZoom: Line 390  class XuPDFScene_PDFZoom:
390          cs1 = bf.addCentralBuoy(globalcursor.getId())          cs1 = bf.addCentralBuoy(globalcursor.getId())
391          # cs1_zoom = vs.coords.affineCoordsys(cs1, 0, 0, 0,          # cs1_zoom = vs.coords.affineCoordsys(cs1, 0, 0, 0,
392          #     100, 0, 0, 100)          #     100, 0, 0, 100)
393          eye = 0.5          eye = 0.2
394          cs1_zoom= vs.coords.distort(cs1, 0, 0, eye, eye, 700, 20)          cs1_zoom= vs.coords.distort(cs1, 0, 0, eye, eye,
395                *(self.mag[0]))
396          vs.matcher.add(cs1_zoom, globalcursor.getId()+"__bulg")          vs.matcher.add(cs1_zoom, globalcursor.getId()+"__bulg")
397          cs1_trans = vs.coords.translateXY(cs1_zoom, -globalx, -globaly)          cs1_trans = vs.coords.translateXY(cs1_zoom, -globalx, -globaly)
398          vs.matcher.add(cs1_trans, globalcursor.getId()+"__trans")          vs.matcher.add(cs1_trans, globalcursor.getId()+"__trans")

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

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