marc
marc

Reputation: 11

Looking for (wxPython) Python 2D drawing framework

I'm looking for a framework for drawing 2D scenes in Python. Not for game programming, but for 'office' like applications (e.g. drawing diagrams, mindmaps etc).

Preferable something that can be used with wxPython.

wxPython comes with OGL, but that is very old and no-one seems to use it any more (I couldn't find a reference to it in any recent project in sourceforge or google code).

The Qt (PyQt) framework has the Scenegraph thing, which I've used in some C++ projects, but I think PyQt with the Qt dependencies is too big.

Requirements are : - managing objects - hit-testing of objects - ability to print the scenes - modern look (at least anti-aliasing of lines)

I've been looking for some days now, but can't find anything that even comes close to PyQt's Scenegraph. I've been thinking about modifying OGL to use a wxGraphicsContext...

P.S. Anyone using OGL, please shout 'OGL is not dead' :-)

Upvotes: 0

Views: 535

Answers (1)

Mike Driscoll
Mike Driscoll

Reputation: 33111

You might be able to use floatcanvas for this. Joran mentioned PyGame, which is certainly a legitimate option. I would also take a look at the WhyteBoard project (https://code.google.com/p/whyteboard/) which is written in wxPython and does a few of the items you mentioned. Finally, wxPython supports Cairo, which you also might find helpful. There are several demos of Cairo in the wxPython demo. By the way, wx.GraphicsContext (which you had mentioned) supports anti-aliasing, as does Cairo.

Upvotes: 1

Related Questions