[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gfx/demo/xupdf.py gzz/view/xubuoy.py
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz gfx/demo/xupdf.py gzz/view/xubuoy.py |
Date: |
Thu, 03 Oct 2002 06:12:32 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/10/03 06:12:32
Modified files:
gfx/demo : xupdf.py
gzz/view : xubuoy.py
Log message:
Numerous fixes towards running - not there yet
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/xupdf.py.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/xubuoy.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/xupdf.py
diff -c gzz/gfx/demo/xupdf.py:1.43 gzz/gfx/demo/xupdf.py:1.44
*** gzz/gfx/demo/xupdf.py:1.43 Thu Oct 3 04:51:46 2002
--- gzz/gfx/demo/xupdf.py Thu Oct 3 06:12:32 2002
***************
*** 13,22 ****
# Now, this is the start of the REAL demo, the one
# with Xanadu links between PDF and text.
- screensize = (1024, 768) # assuming XGA projector.
-
- # center = little above physical center
- screenctr = (0.9 * screensize[0]/2, screensize[1]/2)
# Slow animation for the demo.
AbstractUpdateManager.defaultAnimationTime = 3000
--- 13,18 ----
***************
*** 43,52 ****
"010D41691A3EC1332F7D7BC81686F80A6D1362EBE9")),
)
-
- def enf2span(enf):
- list = enf.getList()
- return list[0]
d1cell = space.N()
d1 = space.getDim(d1cell)
--- 39,44 ----
Index: gzz/gzz/view/xubuoy.py
diff -c gzz/gzz/view/xubuoy.py:1.5 gzz/gzz/view/xubuoy.py:1.6
*** gzz/gzz/view/xubuoy.py:1.5 Thu Oct 3 04:53:54 2002
--- gzz/gzz/view/xubuoy.py Thu Oct 3 06:12:32 2002
***************
*** 22,33 ****
import gzz
import traceback
def getFont():
global font
try:
a=font
except:
! font = GL.createFont("gfx/fonts/a010013l.pfb", 32);
return font
globalspan = None
--- 22,42 ----
import gzz
import traceback
+ screensize = (1024, 768) # assuming XGA projector.
+
+ # center = little above physical center
+ screenctr = (0.9 * screensize[0]/2, screensize[1]/2)
+
+ def enf2span(enf):
+ list = enf.getList()
+ return list[0]
+
def getFont():
global font
try:
a=font
except:
! font = GL.createFont("gfx/fonts/a010013l.pfb", 16);
return font
globalspan = None
***************
*** 40,51 ****
return pagespanview.CellPDFView(cell)
fps_text = GLRen.createHorizText2(getFont(), "FOO", 1, 1, 1, 1)
GL.setDebugVar("JNI.fps", 1)
# Show the intended screen size
def bg(vs):
! putnoc(vs, background((0.3,0.5,0.4)))
! putnoc(vs, getDListNocoords("""
Disable TEXTURE_2D
LineWidth 2
Color 0 0 0
--- 49,63 ----
return pagespanview.CellPDFView(cell)
+ def background(rgb):
+ return gzz.vob.SolidBgVob(java.awt.Color(float(rgb[0]), float(rgb[1]),
float(rgb[2])))
+
fps_text = GLRen.createHorizText2(getFont(), "FOO", 1, 1, 1, 1)
GL.setDebugVar("JNI.fps", 1)
# Show the intended screen size
def bg(vs):
! vs.map.put(background((0.3,0.5,0.4)))
! vs.map.put(GLCache.getCallList("""
Disable TEXTURE_2D
LineWidth 2
Color 0 0 0
***************
*** 133,139 ****
vs.matcher.add(link_end_cs,
"link"+str(self.link)+str(1-self.linkindex))
print "lineconn!"
! putnoc(vs, getDListNocoords("""
PushAttrib ENABLE_BIT
Disable TEXTURE_2D
LineWidth 5
--- 145,151 ----
vs.matcher.add(link_end_cs,
"link"+str(self.link)+str(1-self.linkindex))
print "lineconn!"
! vs.map.put(GLCache.getCallList("""
PushAttrib ENABLE_BIT
Disable TEXTURE_2D
LineWidth 5
***************
*** 141,147 ****
Color 0 0 0 0.6
"""))
vs.map.put(lineconn, main_end_cs, link_end_cs)
! putnoc(vs, getDListNocoords("""
PopAttrib
"""))
--- 153,159 ----
Color 0 0 0 0.6
"""))
vs.map.put(lineconn, main_end_cs, link_end_cs)
! vs.map.put(GLCache.getCallList("""
PopAttrib
"""))
***************
*** 297,303 ****
self.cursor = cell
globalx, globaly = nx, ny
! content = space.cellTexter.getEnfilade(cell, None)
globalspan = enf2span(content)
globalforw = xuindexer.getForwardIndex().getMatches(content)
globalback = xuindexer.getBackwardIndex().getMatches(content)
--- 309,315 ----
self.cursor = cell
globalx, globaly = nx, ny
! content = cell.space.cellTexter.getEnfilade(cell, None)
globalspan = enf2span(content)
globalforw = xuindexer.getForwardIndex().getMatches(content)
globalback = xuindexer.getBackwardIndex().getMatches(content)
***************
*** 387,392 ****
def getDefaultName(self):
return "XuBuoy"
def render(self, vs, cs, context):
! self._getview(win).scene(vs)
--- 399,406 ----
def getDefaultName(self):
return "XuBuoy"
def render(self, vs, cs, context):
! view = self._getview(context)
! view.moveToCell(context.cursor)
! view.scene(vs)