Example #1
0
    def ZoomToFit(self):
        # Calculate bounding box by hand, FC doesn't work right.
        points = list(itertools.chain(x.points for x in self.IterXforms()))
        self.ZoomToBB(NewBB=BBox.fromPoints(points), DrawFlag=False)

        # Factor of .8 is to leave some breathing room
        self.AdjustZoom(.8)
Example #2
0
 def ZoomToFit(self):
     # Calculate bounding box by hand, FC doesn't work right.
     points = list(itertools.chain(x.points for x in self.IterXforms()))
     self.ZoomToBB(NewBB=BBox.fromPoints(points), DrawFlag=False)
     
     # Factor of .8 is to leave some breathing room
     self.AdjustZoom(.8)
Example #3
0
 def OnLeftUp(self, event):
     if event.LeftUp() and not self.StartRBBox is None:
         self.PrevRBBox = None
         EndRBBox = event.GetPosition()
         StartRBBox = self.StartRBBox
         # if mouse has moved less that ten pixels, don't use the box.
         if ( abs(StartRBBox[0] - EndRBBox[0]) > 10
                 and abs(StartRBBox[1] - EndRBBox[1]) > 10 ):
             EndRBBox = self.Canvas.PixelToWorld(EndRBBox)
             StartRBBox = self.Canvas.PixelToWorld(StartRBBox)
             self.Canvas.ZoomToBB( BBox.fromPoints(N.r_[EndRBBox,StartRBBox]) )
         else:
             Center = self.Canvas.PixelToWorld(StartRBBox)
             self.Canvas.Zoom(1.5,Center)
         self.StartRBBox = None
Example #4
0
 def CalcBoundingBox(self):
     self.BoundingBox = BBox.fromPoints((self.Object1.GetConnectPoint(),
                                         self.Object2.GetConnectPoint()) )
     if self._Canvas:
         self._Canvas.BoundingBoxDirty = True
Example #5
0
 def CalcBoundingBox(self):
     self.BoundingBox = BBox.fromPoints(self.getEndPoints())
     if self._Canvas:
         self._Canvas.BoundingBoxDirty = True
Example #6
0
File: dt.py Project: Lanozavr/pvs
	def CalcBoundingBox(self):
		self.BoundingBox = BBox.fromPoints(self.getEndPoints())
		if self._Canvas:
			self._Canvas.BoundingBoxDirty = True