gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gzz/view/buoy buoymanager.py pagespanNodes.py


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/gzz/view/buoy buoymanager.py pagespanNodes.py
Date: Fri, 07 Feb 2003 07:49:29 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        03/02/07 07:49:28

Modified files:
        gzz/view/buoy  : buoymanager.py pagespanNodes.py 

Log message:
        Almost all xupdf functions now there

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/buoy/buoymanager.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/buoy/pagespanNodes.py.diff?tr1=1.20&tr2=1.21&r1=text&r2=text

Patches:
Index: gzz/gzz/view/buoy/buoymanager.py
diff -u gzz/gzz/view/buoy/buoymanager.py:1.12 
gzz/gzz/view/buoy/buoymanager.py:1.13
--- gzz/gzz/view/buoy/buoymanager.py:1.12       Fri Feb  7 05:49:59 2003
+++ gzz/gzz/view/buoy/buoymanager.py    Fri Feb  7 07:49:28 2003
@@ -12,7 +12,7 @@
 
 print "LOADING BUOYMANAGER"
 
-lineconn = GLRen.createLineConnector(0,0)
+lineconn = GLRen.createLineConnector(.5, .5, .5, .5, 0, 0, 0, 0, 0, 1)
 
 class RealBuoyManager(BuoyLinkListener):
     """Manage buoys through the new APIs
@@ -65,12 +65,12 @@
            buoy = self.vs.coords.buoyOnCircle(0, anchorCS,
                                x, self.ctry, r, 
                                x-r, self.ctry, 
-                               0.1)
+                               1.1)
        else:
            buoy = self.vs.coords.buoyOnCircle(0, anchorCS,
                                x, self.ctry, r, 
                                x+r, self.ctry,
-                               0.1)
+                               1.1)
        self.vs.matcher.add(buoy, linkId)
        into = self.vs.orthoBoxCS(buoy, "V", -100, 0, 0, .5, .5, 150, 150)
        into = self.nadir(into)
@@ -85,7 +85,8 @@
            Color 0 0 0 0.6
        """))
 
-       self.vs.map.put(lineconn, anchorCS, otherAnchorCS)
+       self.vs.map.put(lineconn, self.vs.unitSqCS(anchorCS, "UN"), 
+                                 self.vs.unitSqCS(otherAnchorCS, "UN"))
 
        # vs.map.put(filletconn, main_whole_cs, link_whole_cs)
 
Index: gzz/gzz/view/buoy/pagespanNodes.py
diff -u gzz/gzz/view/buoy/pagespanNodes.py:1.20 
gzz/gzz/view/buoy/pagespanNodes.py:1.21
--- gzz/gzz/view/buoy/pagespanNodes.py:1.20     Fri Feb  7 05:49:59 2003
+++ gzz/gzz/view/buoy/pagespanNodes.py  Fri Feb  7 07:49:28 2003
@@ -70,9 +70,20 @@
 
        self.x = xywh[0] + .5 * xywh[2]
        self.y = xywh[1] + .5 * xywh[3]
-    def setShift(self, vs):
+    def _setShift(self, vs):
        vs.coords.setTranslateParams(self.shift, -self.x, -self.y)
 
+    def _linkEndCS(self, enf, key):
+       """Make a coordinate system for the link end and return it.
+       """
+       for repr in gzz.zzutil.Media.getScrollBlockRepresentatives(enf):
+           if repr.getScrollBlock() == self.scrollBlock:
+               xywh = self.layout.getExtents(repr, None)
+               return self.vs.orthoBoxCS(self.shift, key, -20,
+                               xywh[0], xywh[1], 1, 1,xywh[2], xywh[3])
+                   
+       raise "HELP!"
+
     def renderMain(self, vs, into):
        self.vs = vs
        vs.coords.getSqSize(into, size)
@@ -99,13 +110,15 @@
 
        if self.nodetype.scrollBlockLinker.xuIndex != None:
            xuIndex = self.nodetype.scrollBlockLinker.xuIndex
-           for dir, index, otherEndName in [
-                       (1, xuIndex.getForwardIndex(), "to"),
-                       (-1, xuIndex.getBackwardIndex(), "from")]:
+           for dir, index, thisEndName, otherEndName in [
+                       (1, xuIndex.getForwardIndex(), "from", "to"),
+                       (-1, xuIndex.getBackwardIndex(), "to", "from")]:
                for xulink in index.getMatches(self.enf):
+                   myenf = getattr(xulink, thisEndName)
+                   thisEndCS = self._linkEndCS(myenf, xulink)
                    endenf = getattr(xulink, otherEndName)
                    for repr in 
gzz.zzutil.Media.getScrollBlockRepresentatives(endenf):
-                       self.listener.link(dir, into,
+                       self.listener.link(dir, thisEndCS,
                                
self.nodetype.scrollBlockLinker.xulinkPageSpanNodeType,
                                xulink, repr)
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]