graphics/RubberBand.py
changeset 1744 69dfdb26f600
parent 1743 c3c3d1318130
child 1782 5b6ad7a7fd9d
equal deleted inserted replaced
1743:c3c3d1318130 1744:69dfdb26f600
   167         dc.SetLogicalFunction(wx.COPY)
   167         dc.SetLogicalFunction(wx.COPY)
   168 
   168 
   169         # Restore Viewer scale factor
   169         # Restore Viewer scale factor
   170         dc.SetUserScale(scalex, scaley)
   170         dc.SetUserScale(scalex, scaley)
   171 
   171 
   172     def Redraw(self, dc = None):
   172     def Redraw(self, dc=None):
   173         """
   173         """
   174         Redraw rubberband on Viewer
   174         Redraw rubberband on Viewer
   175         @param dc: Device Context of Viewer (default None)
   175         @param dc: Device Context of Viewer (default None)
   176         """
   176         """
   177         # Erase last bbox and draw current bbox
   177         # Erase last bbox and draw current bbox
   178         self.DrawBoundingBoxes([self.LastBBox, self.CurrentBBox], dc)
   178         self.DrawBoundingBoxes([self.LastBBox, self.CurrentBBox], dc)
   179 
   179 
   180     def Erase(self, dc = None):
   180     def Erase(self, dc=None):
   181         """
   181         """
   182         Erase rubberband from Viewer
   182         Erase rubberband from Viewer
   183         @param dc: Device Context of Viewer (default None)
   183         @param dc: Device Context of Viewer (default None)
   184         """
   184         """
   185         # Erase last bbox
   185         # Erase last bbox
   186         self.DrawBoundingBoxes([self.LastBBox], dc)
   186         self.DrawBoundingBoxes([self.LastBBox], dc)
   187 
   187 
   188     def Draw(self, dc = None):
   188     def Draw(self, dc=None):
   189         """
   189         """
   190         Draw rubberband on Viewer
   190         Draw rubberband on Viewer
   191         @param dc: Device Context of Viewer (default None)
   191         @param dc: Device Context of Viewer (default None)
   192         """
   192         """
   193         # Erase last bbox and draw current bbox
   193         # Erase last bbox and draw current bbox