--- a/graphics/RubberBand.py Fri Mar 10 13:00:31 2023 +0100
+++ b/graphics/RubberBand.py Sun Mar 12 00:51:53 2023 +0100
@@ -139,6 +139,11 @@
self.Redraw()
+ def SetRubberBandPen(self, dc):
+ # Set DC drawing style
+ dc.SetPen(wx.Pen(wx.WHITE, style=wx.DOT))
+ dc.SetLogicalFunction(wx.XOR)
+
def DrawBoundingBoxes(self, bboxes, dc=None):
"""
Draw a list of bounding box on Viewer in the order given using XOR
@@ -155,10 +160,9 @@
scalex, scaley = dc.GetUserScale()
dc.SetUserScale(1, 1)
- # Set DC drawing style
- dc.SetPen(wx.Pen(wx.WHITE, style=wx.DOT))
+ self.SetRubberBandPen(dc)
+
dc.SetBrush(wx.TRANSPARENT_BRUSH)
- dc.SetLogicalFunction(wx.XOR)
# Draw the bounding boxes using viewer scale factor
for bbox in bboxes:
@@ -214,6 +218,10 @@
RubberBand.Erase = Erase
+ def SetRubberBandPen(self, dc):
+ dc.SetPen(wx.Pen(wx.BLACK, style=wx.DOT))
+
+ RubberBand.SetRubberBandPen = SetRubberBandPen
if "gtk3" in wx.PlatformInfo:
PatchRubberBandForGTK3()