/[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.22 by mudyc, Wed May 21 18:09:21 2003 UTC revision 1.23 by mudyc, Fri May 23 15:03:16 2003 UTC
# Line 100  class SingleFocusManager(BuoyLinkListene Line 100  class SingleFocusManager(BuoyLinkListene
100      def link(self, *args):      def link(self, *args):
101          self.links.append(args)          self.links.append(args)
102    
103      def _linkReally(self, direction, anchorCS, otherNode, linkId, otherAnchor):      def _linkReally(self, direction, anchorCS, otherNode, linkId, otherAnchor, shift=0):
104          """Create the real buoy.          """Create the real buoy.
105          """          """
106          if dbg: pa('link really')          if dbg: pa('link really')
107    
108            ### Shift the anchorCS for some degrees
109            if shift > 0:
110                # evens 2,4,6 ->  1,2,3,4,..
111                # odds 1,3,5,7 -> -1,-2,-3,-4
112                if shift%2 == 1:
113                    shift += 1
114                    shift *= -1
115            shift *= 0.5
116            shiftedAnchorCS = self.vs.translateCS(anchorCS, 'Shift',0, shift*18)
117    
118          ### Buoy coordinate system          ### Buoy coordinate system
119          buoy = self.vs.coords.buoyOnCircle2(self.buoyinto, anchorCS,          buoy = self.vs.coords.buoyOnCircle2(self.buoyinto, shiftedAnchorCS,
120                                  direction, 10)                                  direction, 10)
121          self.vs.matcher.add(self.buoyinto, buoy, linkId)          self.vs.matcher.add(self.buoyinto, buoy, linkId)
122    

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

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