[wxPython-users] wx.lib.ogl - weirdness after
LineShape.InsertLineControlPoint
Pierre Hjälm
pierre.hjalm at dis.uu.se
Fri Jan 12 01:48:02 PST 2007
Gary Greyling <gary.greyling at gmail.com> writes:
> Hello Pierre,
>
> The LineShape.InsertLineControlPoint asways inserts the point as the
> second last item in LineShape._lineControlPoints. Below is code that
> will find the real position of a point along the line and i suggest we
> replace the InsertLineControlPoint with the code below.
>
> def InsertLineControlPoint(self, dc, point):
> """Find the position in the control point list and insert the
> control point there"""
You probably want to make it more compatible with the old method.
def InsertLineControlPoint(self, dc = None, point = None):
dc and point are optional. But otherwise it seems like a great idea, unless
someone actually expects the old behaviour. Perhaps another argument could
be added:
def InsertLineControlPoint(self, dc = None, point = None, inorder = False):
where if inorder is set it uses your way and if false (the default) it uses the
old way? Depending on how you interpret inorder, it could of course be the
other way round :)
--
Pierre Hjälm
More information about the wxpython-users
mailing list