@@ -1574,7 +1574,11 @@ def __init__(self, canvas):
1574
1574
self ._idle = True
1575
1575
self .statbar = None
1576
1576
self .prevZoomRect = None
1577
- self .RetinaFix = 'wxMac' in wx .PlatformInfo
1577
+ # for now, use alternate zoom-rectangle drawing on all
1578
+ # Macs. N.B. In future versions of wx it may be possible to
1579
+ # detect Retina displays with window.GetContentScaleFactor()
1580
+ # and/or dc.GetContentScaleFactor()
1581
+ self .retinaFix = 'wxMac' in wx .PlatformInfo
1578
1582
1579
1583
def get_canvas (self , frame , fig ):
1580
1584
return FigureCanvasWx (frame , - 1 , fig )
@@ -1676,7 +1680,7 @@ def dynamic_update(self):
1676
1680
1677
1681
def press (self , event ):
1678
1682
if self ._active == 'ZOOM' :
1679
- if not self .RetinaFix :
1683
+ if not self .retinaFix :
1680
1684
self .wxoverlay = wx .Overlay ()
1681
1685
else :
1682
1686
self .savedRetinaImage = self .canvas .copy_from_bbox (
@@ -1688,7 +1692,7 @@ def release(self, event):
1688
1692
if self ._active == 'ZOOM' :
1689
1693
# When the mouse is released we reset the overlay and it
1690
1694
# restores the former content to the window.
1691
- if not self .RetinaFix :
1695
+ if not self .retinaFix :
1692
1696
self .wxoverlay .Reset ()
1693
1697
del self .wxoverlay
1694
1698
else :
@@ -1698,7 +1702,7 @@ def release(self, event):
1698
1702
self .prevZoomRect = None
1699
1703
1700
1704
def draw_rubberband (self , event , x0 , y0 , x1 , y1 ):
1701
- if self .RetinaFix : # On Macs, use the following code
1705
+ if self .retinaFix : # On Macs, use the following code
1702
1706
# wx.DCOverlay does not work properly on Retina displays.
1703
1707
rubberBandColor = '#C0C0FF'
1704
1708
if self .prevZoomRect :
0 commit comments