/[libvob]/libvob/vob/buoy/buoymanager.py
ViewVC logotype

Diff of /libvob/vob/buoy/buoymanager.py

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

revision 1.54 by tjl, Wed Aug 13 06:47:03 2003 UTC revision 1.55 by tjl, Wed Aug 13 12:08:29 2003 UTC
# Line 91  class SingleFocusManager(BuoyLinkListene Line 91  class SingleFocusManager(BuoyLinkListene
91    
92      def getMainNode(self):      def getMainNode(self):
93          return self.mainNode          return self.mainNode
94      def _nadir(self, cs):      def drawscene(self, vs, mainboxinto, into, buoyinto):
         n =  self.vs.coords.nadirUnitSq(cs, self.nadirCS)  
         self.vs.matcher.add(cs, n, "NADIR")  
         return n  
     def drawscene(self, vs, mainboxinto, into, buoyinto, nadirCS):  
95          self.vs = vs          self.vs = vs
         self.nadirCS = nadirCS  
96          self.buoyinto = buoyinto          self.buoyinto = buoyinto
97          self.cs = { }          self.cs = { }
98    
# Line 168  class SingleFocusManager(BuoyLinkListene Line 163  class SingleFocusManager(BuoyLinkListene
163              dbg1 = self.vs.unitSqCS(into, "U")              dbg1 = self.vs.unitSqCS(into, "U")
164              self.vs.put(coloredQuad((0,1,0)), dbg1)              self.vs.put(coloredQuad((0,1,0)), dbg1)
165    
         into = self._nadir(into)  
166          self.vs.activate(into)          self.vs.activate(into)
167    
168          ### Render the buoy, get back anchor cs          ### Render the buoy, get back anchor cs
# Line 177  class SingleFocusManager(BuoyLinkListene Line 171  class SingleFocusManager(BuoyLinkListene
171          self.cs[into] = (otherNode, linkId, otherAnchor, into)          self.cs[into] = (otherNode, linkId, otherAnchor, into)
172    
173          if anchorCS >= 0:          if anchorCS >= 0:
174                # anchorCS < 0 when there is no anchor, e.g., for ttconnector
175                # in FenPDF
176              self.vs.map.put(lineconn, self.vs.unitSqCS(anchorCS, "UN"),              self.vs.map.put(lineconn, self.vs.unitSqCS(anchorCS, "UN"),
177                              self.vs.unitSqCS(otherAnchorCS, "UN"))                              self.vs.unitSqCS(otherAnchorCS, "UN"))
178    
# Line 258  class MultiBuoyManager: Line 254  class MultiBuoyManager:
254              return sc              return sc
255          self.vs = vs          self.vs = vs
256    
         nadirCS = vs.translateCS(0, "NADIRORIGIN",  
                     .5 * vs.size.width,  
                     3.0 * vs.size.height)  
   
257          vs.put(background((.36, .74, 1.0)))          vs.put(background((.36, .74, 1.0)))
258    
         # XXX Should we take these geometries through nadir?  
   
259          geoms = self.geometer.place(vs)          geoms = self.geometer.place(vs)
260    
261          for i in range(0, len(self.singles)):          for i in range(0, len(self.singles)):
262              self.singles[i].drawscene(vs,              self.singles[i].drawscene(vs,
263                      geoms[i][0],                      geoms[i][0],
264                      geoms[i][1],                      geoms[i][1],
265                      geoms[i][2],                      geoms[i][2])
                     nadirCS)  
266    
267      def mouse(self, ev):      def mouse(self, ev):
268          """ Returns true if buoymanager has eaten the event ;)"""          """ Returns true if buoymanager has eaten the event ;)"""

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55

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