On 12/9/10 11:02 AM, Richard Fuhr wrote:
that enabled the
user to explore
some of the properties of Bezier and spline curves.
OK -- so you really do need "real" Bezier cublic splines.
Now it is time to implement the graphics and a GUI, and I am looking for
the following:
* APIs that draw cubic Bezier curves ( or several cubic Bezier
curves joined together ) ideally without requiring the programmer
to implement a linear approximation of the curves (and it looks
like wxPython is quite suitable)
yup -- wx.GraphicsContext should do that fine.
* GUI functionality that responds to mouse down, mouse moved, and
mouse up events, so that the user can drag around control points (
represented by circles on the canvas ) and thus modify the curve.
None of that interaction comes out of the box with wx. My FloatCanvas
would make that pretty easy, once you added the Spline. See the demos
that come with the source code in SVN, in particular PolyEditor.py
FloatCanvas2 might make it even easier, but I'm not very familiar with
that one -- you might try out its demo -- there's a lot of stuff in
there. Also -- at one point, it didn't render right on OS-X -- I'm not
sure where that's at. A question to the FloatCanvas list should get you
an answer.
I have just started to explore wxPython today, so this is all still
new. I had trouble getting the Python 2.7 wx to work,
What were your troubles? I haven't tried 2.7 yet, but it *should* work.
Have you posted to the wxyPython list with a questions/bug report?
but have
downloaded and installed the Python 2.6 version, which is working.
which is fine anyway.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
[email protected]