[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/demo xupdf.py
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gfx/demo xupdf.py |
Date: |
Tue, 17 Sep 2002 14:17:22 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/17 14:17:22
Modified files:
gfx/demo : xupdf.py
Log message:
Start with the full paper view
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/xupdf.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/xupdf.py
diff -c gzz/gfx/demo/xupdf.py:1.1 gzz/gfx/demo/xupdf.py:1.2
*** gzz/gfx/demo/xupdf.py:1.1 Tue Sep 17 11:37:44 2002
--- gzz/gfx/demo/xupdf.py Tue Sep 17 14:17:22 2002
***************
*** 61,66 ****
--- 61,79 ----
pdfpaper(p) for p in prect
]
+ def placepapers(vs, cs2, papers, key, x, y, h):
+ # The height in coords
+ ph = papers[0][2]
+ curx = x
+ for i in range(0, len(papers)):
+ cs1 = vs.coords.affineCoordsys(0, key+"_"+str(i), 10,
+ curx, y, h/ph, 0, 0, h/ph)
+ 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)
+
+
class XuPDFScene:
def __init__(self):
self.x = self.y = 0
***************
*** 70,76 ****
print "Mousehere ",ev
if ev.getID() == ev.MOUSE_CLICKED:
self.x -= ev.getX() - screensize[0]/2
! self.y -= ev.getY() - screensize[1]/2
print "Mouse ",self.x,self.y
AbstractUpdateManager.chg()
def scene(self, vs):
--- 83,90 ----
print "Mousehere ",ev
if ev.getID() == ev.MOUSE_CLICKED:
self.x -= ev.getX() - screensize[0]/2
! # self.y -= ev.getY() - screensize[1]/2
! self.y = ev.getY()
print "Mouse ",self.x,self.y
AbstractUpdateManager.chg()
def scene(self, vs):
***************
*** 88,102 ****
Enable TEXTURE_2D
""" % { "w": screensize[0], "h": screensize[1] } ) )
! cs2 = vs.coords.affineCoordsys(0, "2", 8.5,
! screensize[0]/2, 0.9 * screensize[1]/2, 100, 0,0,70)
! for i in range(0,len(pap)):
! pq = GZZGL.createFisheyePaperQuad(
! pap[i][0], 0, 0, pap[i][1], pap[i][2], 21, 21)
! cs1 = vs.coords.affineCoordsys(0, "1_"+str(i), 10,
! self.x + 290 * i, self.y,
! 200, 0, 0, 200 )
! vs.map.put(pq, cs1, cs2)
currentScene = XuPDFScene()
--- 102,119 ----
Enable TEXTURE_2D
""" % { "w": screensize[0], "h": screensize[1] } ) )
! # cs2 = vs.coords.affineCoordsys(0, "2", 8.5,
! # screensize[0]/2, 0.9 * screensize[1]/2, 100, 0,0,70)
! cs2 = vs.coords.affineCoordsys(0, "2", 9.0,
! screensize[0]/2, self.y, 150, 0,0, 100)
! placepapers(vs, cs2, pap, "foo", self.x, 0, 768)
! # for i in range(0,len(pap)):
! # pq = GZZGL.createFisheyePaperQuad(
! # pap[i][0], 0, 0, pap[i][1], pap[i][2], 21, 21)
! # cs1 = vs.coords.affineCoordsys(0, "1_"+str(i), 10,
! # self.x + 290 * i, self.y,
! # 200, 0, 0, 200 )
! # vs.map.put(pq, cs1, cs2)
currentScene = XuPDFScene()
- [Gzz-commits] gzz/gfx/demo xupdf.py,
Tuomas J. Lukka <=
- [Gzz-commits] gzz/gfx/demo xupdf.py, Tuomas J. Lukka, 2002/09/17
- [Gzz-commits] gzz/gfx/demo xupdf.py, Tuomas J. Lukka, 2002/09/18
- [Gzz-commits] gzz/gfx/demo xupdf.py, Tuomas J. Lukka, 2002/09/18
- [Gzz-commits] gzz/gfx/demo xupdf.py, Janne V. Kujala, 2002/09/18
- [Gzz-commits] gzz/gfx/demo xupdf.py, Tuomas J. Lukka, 2002/09/18
- [Gzz-commits] gzz/gfx/demo xupdf.py, Tuomas J. Lukka, 2002/09/27
- [Gzz-commits] gzz/gfx/demo xupdf.py, Tuomas J. Lukka, 2002/09/27
- [Gzz-commits] gzz/gfx/demo xupdf.py, Tuukka Hastrup, 2002/09/30