@@ -508,6 +508,8 @@ def __init__(self, parent, id, figure=None):
508
508
_log .debug ("%s - __init__() - bitmap w:%d h:%d" , type (self ), w , h )
509
509
self ._isDrawn = False
510
510
self ._rubberband_rect = None
511
+ self ._rubberband_pen_black = wx .Pen ('BLACK' , 1 , wx .PENSTYLE_SHORT_DASH )
512
+ self ._rubberband_pen_white = wx .Pen ('WHITE' , 1 , wx .PENSTYLE_SOLID )
511
513
512
514
self .Bind (wx .EVT_SIZE , self ._on_size )
513
515
self .Bind (wx .EVT_PAINT , self ._on_paint )
@@ -626,10 +628,10 @@ def gui_repaint(self, drawDC=None):
626
628
if self ._rubberband_rect is not None :
627
629
# Some versions of wx+python don't support numpy.float64 here.
628
630
x0 , y0 , x1 , y1 = map (int , self ._rubberband_rect )
629
- drawDC . DrawLineList (
630
- [ (x0 , y0 , x1 , y0 ), (x1 , y0 , x1 , y1 ),
631
- ( x0 , y0 , x0 , y1 ), ( x0 , y1 , x1 , y1 )],
632
- wx . Pen ( 'BLACK' , 1 , wx . PENSTYLE_SHORT_DASH ) )
631
+ rect = [( x0 , y0 , x1 , y0 ), ( x1 , y0 , x1 , y1 ),
632
+ (x0 , y0 , x0 , y1 ), (x0 , y1 , x1 , y1 )]
633
+ drawDC . DrawLineList ( rect , self . _rubberband_pen_white )
634
+ drawDC . DrawLineList ( rect , self . _rubberband_pen_black )
633
635
634
636
filetypes = {
635
637
** FigureCanvasBase .filetypes ,
0 commit comments