/[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.5 by tjl, Wed Sep 18 07:38:29 2002 UTC revision 1.6 by tjl, Wed Sep 18 10:01:26 2002 UTC
# Line 61  globalpap = [ Line 61  globalpap = [
61      pdfpaper(p) for p in prect      pdfpaper(p) for p in prect
62  ]  ]
63    
64  def placepapers(vs, cs2, papers, key, x, y, paperx, papery, h):  def placepapers(vs, cs2, papers, key, x, y, paperx, papery, h, onlypages=None):
65      # The height in coords      # The height in coords
66      ph = papers[0][2]      ph = papers[0][2]
67      curx = x - h/ph * paperx      curx = x - h/ph * paperx
68      ycoord = y - h/ph * papery      ycoord = y - h/ph * papery
69      print "x,y for place: ",curx, ycoord      print "x,y for place: ",curx, ycoord
70      for i in range(0, len(papers)):      for i in range(0, len(papers)):
71          cs1 = vs.coords.affineCoordsys(0, key+"_"+str(i), 10,          if onlypages == None or i in onlypages:
72                  curx, ycoord, h/ph, 0, 0, h/ph)              cs1 = vs.coords.affineCoordsys(0, key+"_"+str(i), 10,
73                        curx, ycoord, h/ph, 0, 0, h/ph)
74                pq = GZZGL.createFisheyePaperQuad(
75                    papers[i][0], 0, 0, papers[i][1], papers[i][2], 21, 21)
76                vs.map.put(pq, cs1, cs2)
77          curx += 1.02 * h/ph * papers[i][1]          curx += 1.02 * h/ph * papers[i][1]
         pq = GZZGL.createFisheyePaperQuad(  
             papers[i][0], 0, 0, papers[i][1], papers[i][2], 21, 21)  
         vs.map.put(pq, cs1, cs2)  
78                    
79  # Paper coordinates of current focus  # Paper coordinates of current focus
80  globalx = 0  globalx = 0

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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