Welcome to the TRAC site for FloatCanvas

FloatCanvas is a component for (and written with) wxpython designed to make it easy to draw and interact with graphics in arbitrary floating point based coordinate systems. It's a persistent object canvas that supports a variety of graphic objects and:

  • zooming
  • panning
  • binding mouse clicks on object to callbacks.

It includes a large variety of built-in graphics objects, including:

  • Bitmaps
  • lines
  • polygons
  • circles
  • rectangles
  • Text, scaled and unscaled
  • Wrapped Text boxes (very minimal layout options)
  • points
  • Ellipses
  • .....

It is also designed to quite extensible -- it's easy to add addition object types, and alter interactive behavior.

It is published under the same license as wxPython (wxWidgets Library License), which means that you can use it in exactly the same circumstances as wxPython itself, which makes sense as it's useless without wxPython.

Getting the source code

A version of FloatCanvas is included with wxPython, in wx/lib/floatcanvas. However, that version is not always up to date, and doesn't include the full set of demos. Your best bet is to get the source from SVN. Floatcanvas now has a new home, as one of the wxPython "3rd Party" packages. You can access it as part of the entire wx SVN repository, or by itself with this url:

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

You can download it with this command:

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

or the equivalent in your GUI SVN client of choice. If you can't use svn, please send a note to the mailing list, and we'll try to send you an archive of the code.

You can also browse the code with the viewvc interface:

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

If you wish to contribute, rather than just download, please submit patches to the milaing list or Chris Barker Chris.Barker@noaa.gov

Mailing list

A mailing list is running for FloatCanvas announcements and discussion:

API documentation

I'm afraid documentation is pretty week at this point. You can learn about FloatCanvas by:

  • Checking out the Demos -- both the main 'FloatCanvasDemo.py', and a bunch of little demos in the Demos dir.
  • browse the mailing list archives
  • read the source
  • Check out the auto-generated docs: A tentative doxygen site is available here. Should the docs for the demo also be included in this docs? Here is a link to the doxygen documentation markup language and doxypy preprocessing filter. These docs are definitively rough at the moment! Alternative options to doxygen should be considered. However, given time, doxygen can provide useful docs.

How-to

FloatCanvas showcase

http://lewifi.googlecode.com

Walk around with a laptop, stop, click, repeat until you have enough data. Now you have a floor plan showing how good the wifi coverage is.

OPCON sandbox

This wargame/simulator needed a canvas surface with unrestricted zooming and a convenient simulator to screen interface.

Maps

Some nice work with maps and FloatCanvas

Drawing Wind Barbs

From the same user as above.

Provillus
Thyromine
Natural Gain Plus
venapro

Float Canvas Refactor

Over the years I've worked on FloatCanvas, I've learned a lot of about structuring code, and programming in general. Also, folks have extended FloatCanvas use beyond my original ideas, and wxPython has added features. So, I think it's time for a re-factoring effort. Anything is on the table, but I hope not to change the spirit of the project, of break the API too much -- here is the Refactoring page with discussion: Refactor