FloatCanvas

FloatCanvas is a vector graphics canvas included in wxPython. It is written and maintained by Chris Barker.

FloatCanvas is developed separately from wxPython and the latest version is merged into wxPython just before a release. However, it is now maintianed in the wxPyton "3rd party" SVN repository:

http://svn.wxwidgets.org/svn/wx/wxPython/3rdParty/FloatCanvas/

View the code online at http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/FloatCanvas/

You can get more into at the FloatCanvas TRAC site at:

http://trac.paulmcnett.com/floatcanvas .

Float Canvas also has it's own mailing list for FloatCanvas announcements and discussion:

http://mail.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas


Basically, you have a canvas that you can put lines, polys, rects, circles, bitmaps, and text on. The canvas takes care of redraws and sizing for you. It comes with a toolbar for zooming and panning. It has a full set of mouse events and a callback mechanism for reacting to users clicking, etc. on the objects.

The code is sort of special case, but can be used for general purposes, just as long as you don't mind the FloatCanvas feeling slightly out of place.

The code is well documented (well, you can figure out what's going on, at least), and makes excellent training code if you're trying to make your own canvas class.

The zip file includes demonstration code, you can run it out of the box. Unless you don't have numpy. It relies on numpy's array class pretty heavily.

-- LionKimbro 2003-09-23 20:08:31

Note from Chris:

I've intentionally made FloatCanvas "slightly out of place", as I was trying to make the whole idea of drawing stuff easier than a wx.DC. You don't have to deal with wx.Pens, wx.Brushes, etc. In a way, I've tried to make it more "Pythonic", more like I would like a GUI toolkit for Python to be. However, this may not be a reasonable design goal. You really can't use it unless you are pretty comfortable with wxPython anyway.

-Chris Barker 2004-03-01 12:30:00

Projects using Float Canvas

FloatCanvas (last edited 2011-11-02 15:52:46 by c-50-132-4-194)

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.