Patch from Davide Salomoni that adds an optional point
parameter to LineShape.InsertLineControlPoint allowing one to optionally specify where the new control point has to be drawn. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,6 +91,14 @@ while pasting).
|
|||||||
wx.lib.filebrowsebutton: Bug fix from Chad Netzer for when
|
wx.lib.filebrowsebutton: Bug fix from Chad Netzer for when
|
||||||
self.history is None.
|
self.history is None.
|
||||||
|
|
||||||
|
wx.ogl: Patch from Davide Salomoni that adds an optional point
|
||||||
|
parameter to LineShape.InsertLineControlPoint allowing one to
|
||||||
|
optionally specify where the new control point has to be drawn.
|
||||||
|
|
||||||
|
wxMSW: setting foreground colour for wx.CheckBox now works when using
|
||||||
|
XP themes.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2.6.0.0
|
2.6.0.0
|
||||||
|
@@ -298,11 +298,14 @@ class LineShape(Shape):
|
|||||||
# the middle points to something other than (-999, -999)
|
# the middle points to something other than (-999, -999)
|
||||||
self._initialised = False
|
self._initialised = False
|
||||||
|
|
||||||
def InsertLineControlPoint(self, dc = None):
|
def InsertLineControlPoint(self, dc = None, point = None):
|
||||||
"""Insert a control point at an arbitrary position."""
|
"""Insert a control point at an optional given position."""
|
||||||
if dc:
|
if dc:
|
||||||
self.Erase(dc)
|
self.Erase(dc)
|
||||||
|
|
||||||
|
if point:
|
||||||
|
line_x, line_y = point
|
||||||
|
else:
|
||||||
last_point = self._lineControlPoints[-1]
|
last_point = self._lineControlPoints[-1]
|
||||||
second_last_point = self._lineControlPoints[-2]
|
second_last_point = self._lineControlPoints[-2]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user