开发者

Interactive vector graphics canvas for python?

I'm writing a small application in Python, and I wanted the user to be able to place, move, rotate, etc. different objects on a canvas. Is there any way to accomplish that without a ton of coding? I'm doing this in my free time, and I only have a limited experience in PyQt.

That's basically what any vector graphics editor does (ie. Inkscape, Corel Draw or Dr. Geo): they give the users hand开发者_开发问答les to move, stretch and rotate objects. I was wondering if there's any widget or whatever that already provides the handles and the basic operations, so I only have to implement the program's reaction to those operations.

Since I'm planning on releasing this under a free license (if I ever get to the point of releasing) any open source license would be great.

Thanks!


Look at Qt Graphics View Framework, it is supported in PyQt4. Another option is to use OpenGL which will require more code but provide more flexibility and hardware acceleration (also supported in PyQt4).


One option is GooCanvas and the Python bindings for it. GooCanvas


Look at the library gaphas, it implements object resize/move/edit by default, so it is quick to start with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜