Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit333fcaf

Browse files
committed
Fix rubberband visibility for wx backend
1 parente98d8d0 commit333fcaf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎lib/matplotlib/backends/backend_wx.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,8 @@ def __init__(self, parent, id, figure=None):
508508
_log.debug("%s - __init__() - bitmap w:%d h:%d",type(self),w,h)
509509
self._isDrawn=False
510510
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)
511513

512514
self.Bind(wx.EVT_SIZE,self._on_size)
513515
self.Bind(wx.EVT_PAINT,self._on_paint)
@@ -626,10 +628,10 @@ def gui_repaint(self, drawDC=None):
626628
ifself._rubberband_rectisnotNone:
627629
# Some versions of wx+python don't support numpy.float64 here.
628630
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)
633635

634636
filetypes= {
635637
**FigureCanvasBase.filetypes,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp