Interactive vector graphics for python?

I am writing a small Python application and I wanted the user to be able to place, move, rotate, etc. various objects on canvas. Is there a way to do this without the finer points of coding? I do this in my free time, and I have limited experience with PyQt.

This is basically what any vector graphics editor (such as Inkscape, Corel Draw or Dr. Geo ) does: they let users manipulate movement, stretch and rotate objects. I was wondering if there is any widget or something else that already provides handles and basic operations, so I only need to perform the program’s reaction to these operations.

Since I plan to release this under a free license (if I ever get to the time of release), any open source license would be great.

Thanks!

+8
python vector-graphics widget
source share
3 answers

Check out the 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 ).

+4
source share

One option is GooCanvas and Python bindings for it. Goocanvas

+3
source share

Look at the gaphas library, it implements the default resizing / moving / editing of an object, so get started quickly.

0
source share

Source: https://habr.com/ru/post/649996/


All Articles