def _drawRubberBand(self, corner1, corner2):
"""Draws/erases rect box from corner1 to corner2"""
ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(
corner1, corner2)
# draw rectangle
dc = wx.ClientDC(self.canvas)
dc.SetPen(wx.Pen(wx.BLACK))
dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
dc.SetLogicalFunction(wx.INVERT)
dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
dc.SetLogicalFunction(wx.COPY)
评论列表
文章目录