Skip to content

Commit 0f9b73d

Browse files
committed
Improve bounds of wx rubberband
1 parent 1e278c7 commit 0f9b73d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def gui_repaint(self, drawDC=None):
627627
drawDC.DrawBitmap(bmp, 0, 0)
628628
if self._rubberband_rect is not None:
629629
# Some versions of wx+python don't support numpy.float64 here.
630-
x0, y0, x1, y1 = map(int, self._rubberband_rect)
630+
x0, y0, x1, y1 = map(round, self._rubberband_rect)
631631
rect = [(x0, y0, x1, y0), (x1, y0, x1, y1),
632632
(x0, y0, x0, y1), (x0, y1, x1, y1)]
633633
drawDC.DrawLineList(rect, self._rubberband_pen_white)

0 commit comments

Comments
 (0)