|
|
26b05c4 |
diff -up wxPython-src-3.0.2.0/wxPython/wx/lib/plot.py.plot wxPython-src-3.0.2.0/wxPython/wx/lib/plot.py
|
|
|
26b05c4 |
--- wxPython-src-3.0.2.0/wxPython/wx/lib/plot.py.plot 2014-10-13 18:37:22.000000000 -0400
|
|
|
26b05c4 |
+++ wxPython-src-3.0.2.0/wxPython/wx/lib/plot.py 2015-01-04 20:38:04.645350202 -0500
|
|
|
26b05c4 |
@@ -237,7 +237,7 @@ class PolyLine(PolyPoints):
|
|
|
26b05c4 |
:keyword `attr`: keyword attributes, default to:
|
|
|
26b05c4 |
|
|
|
26b05c4 |
========================== ================================
|
|
|
26b05c4 |
- 'colour'= 'black' wx.Pen Colour any wx.Colour
|
|
|
26b05c4 |
+ 'colour'= 'black' wx.Pen Colour any wx.NamedColour
|
|
|
26b05c4 |
'width'= 1 Pen width
|
|
|
26b05c4 |
'style'= wx.PENSTYLE_SOLID wx.Pen style
|
|
|
26b05c4 |
'legend'= '' Line Legend to display
|
|
|
26b05c4 |
@@ -251,7 +251,7 @@ class PolyLine(PolyPoints):
|
|
|
26b05c4 |
width = self.attributes['width'] * printerScale * self._pointSize[0]
|
|
|
26b05c4 |
style = self.attributes['style']
|
|
|
26b05c4 |
if not isinstance(colour, wx.Colour):
|
|
|
26b05c4 |
- colour = wx.Colour(colour)
|
|
|
26b05c4 |
+ colour = wx.NamedColour(colour)
|
|
|
26b05c4 |
pen = wx.Pen(colour, width, style)
|
|
|
26b05c4 |
pen.SetCap(wx.CAP_BUTT)
|
|
|
26b05c4 |
dc.SetPen(pen)
|
|
|
26b05c4 |
@@ -287,7 +287,7 @@ class PolySpline(PolyLine):
|
|
|
26b05c4 |
:keyword `attr`: keyword attributes, default to:
|
|
|
26b05c4 |
|
|
|
26b05c4 |
========================== ================================
|
|
|
26b05c4 |
- 'colour'= 'black' wx.Pen Colour any wx.Colour
|
|
|
26b05c4 |
+ 'colour'= 'black' wx.Pen Colour any wx.NamedColour
|
|
|
26b05c4 |
'width'= 1 Pen width
|
|
|
26b05c4 |
'style'= wx.PENSTYLE_SOLID wx.Pen style
|
|
|
26b05c4 |
'legend'= '' Line Legend to display
|
|
|
26b05c4 |
@@ -301,7 +301,7 @@ class PolySpline(PolyLine):
|
|
|
26b05c4 |
width = self.attributes['width'] * printerScale * self._pointSize[0]
|
|
|
26b05c4 |
style = self.attributes['style']
|
|
|
26b05c4 |
if not isinstance(colour, wx.Colour):
|
|
|
26b05c4 |
- colour = wx.Colour(colour)
|
|
|
26b05c4 |
+ colour = wx.NamedColour(colour)
|
|
|
26b05c4 |
pen = wx.Pen(colour, width, style)
|
|
|
26b05c4 |
pen.SetCap(wx.CAP_ROUND)
|
|
|
26b05c4 |
dc.SetPen(pen)
|
|
|
26b05c4 |
@@ -365,9 +365,9 @@ class PolyMarker(PolyPoints):
|
|
|
26b05c4 |
marker = self.attributes['marker']
|
|
|
26b05c4 |
|
|
|
26b05c4 |
if colour and not isinstance(colour, wx.Colour):
|
|
|
26b05c4 |
- colour = wx.Colour(colour)
|
|
|
26b05c4 |
+ colour = wx.NamedColour(colour)
|
|
|
26b05c4 |
if fillcolour and not isinstance(fillcolour, wx.Colour):
|
|
|
26b05c4 |
- fillcolour = wx.Colour(fillcolour)
|
|
|
26b05c4 |
+ fillcolour = wx.NamedColour(fillcolour)
|
|
|
26b05c4 |
|
|
|
26b05c4 |
dc.SetPen(wx.Pen(colour, width))
|
|
|
26b05c4 |
if fillcolour:
|
|
|
26b05c4 |
@@ -595,9 +595,9 @@ class PlotCanvas(wx.Panel):
|
|
|
26b05c4 |
|
|
|
26b05c4 |
# set curser as cross-hairs
|
|
|
26b05c4 |
self.canvas.SetCursor(wx.CROSS_CURSOR)
|
|
|
26b05c4 |
- self.HandCursor = wx.Cursor(Hand.GetImage())
|
|
|
26b05c4 |
- self.GrabHandCursor = wx.Cursor(GrabHand.GetImage())
|
|
|
26b05c4 |
- self.MagCursor = wx.Cursor(MagPlus.GetImage())
|
|
|
26b05c4 |
+ self.HandCursor = wx.CursorFromImage(Hand.GetImage())
|
|
|
26b05c4 |
+ self.GrabHandCursor = wx.CursorFromImage(GrabHand.GetImage())
|
|
|
26b05c4 |
+ self.MagCursor = wx.CursorFromImage(MagPlus.GetImage())
|
|
|
26b05c4 |
|
|
|
26b05c4 |
# Things for printing
|
|
|
26b05c4 |
self._print_data = None
|
|
|
26b05c4 |
@@ -681,7 +681,7 @@ class PlotCanvas(wx.Panel):
|
|
|
26b05c4 |
if isinstance(colour, wx.Colour):
|
|
|
26b05c4 |
self._gridColour = colour
|
|
|
26b05c4 |
else:
|
|
|
26b05c4 |
- self._gridColour = wx.Colour(colour)
|
|
|
26b05c4 |
+ self._gridColour = wx.NamedColour(colour)
|
|
|
26b05c4 |
|
|
|
26b05c4 |
# SaveFile
|
|
|
26b05c4 |
def SaveFile(self, fileName=''):
|
|
|
26b05c4 |
@@ -1513,7 +1513,7 @@ class PlotCanvas(wx.Panel):
|
|
|
26b05c4 |
# Make new offscreen bitmap: this bitmap will always have the
|
|
|
26b05c4 |
# current drawing in it, so it can be used to save the image to
|
|
|
26b05c4 |
# a file, or whatever.
|
|
|
26b05c4 |
- self._Buffer = wx.Bitmap(Size.width, Size.height)
|
|
|
26b05c4 |
+ self._Buffer = wx.EmptyBitmap(Size.width, Size.height)
|
|
|
26b05c4 |
self._setSize()
|
|
|
26b05c4 |
|
|
|
26b05c4 |
self.last_PointLabel = None # reset pointLabel
|
|
|
26b05c4 |
@@ -1578,7 +1578,7 @@ class PlotCanvas(wx.Panel):
|
|
|
26b05c4 |
width = self._Buffer.GetWidth()
|
|
|
26b05c4 |
height = self._Buffer.GetHeight()
|
|
|
26b05c4 |
if sys.platform != "darwin":
|
|
|
26b05c4 |
- tmp_Buffer = wx.Bitmap(width, height)
|
|
|
26b05c4 |
+ tmp_Buffer = wx.EmptyBitmap(width, height)
|
|
|
26b05c4 |
dcs = wx.MemoryDC()
|
|
|
26b05c4 |
dcs.SelectObject(tmp_Buffer)
|
|
|
26b05c4 |
dcs.Clear()
|