How to free rotate an object programmatically?

Discussion about writing code for Inkscape.
Posts: 4
Joined: Wed Jan 03, 2018 8:15 am

How to free rotate an object programmatically?

Postby wyatt121 » Mon Jul 09, 2018 5:42 pm


I am trying to rotate an object X degrees. I would like to use the command line interface, but I only see ObjectRotate90, ObjectRotate90CCW. In addition, it is my understanding that I can't pass values through verbs. So I couldn't even do FreeRotate=X even if this verb existed...

Does anybody have an idea how I can free rotate an object? Is it possible to pass values through an extension via a command line? I'm assuming this is impossible also since I will still need to use a verb and can't pass values through verbs.

What's up with "Inkscape Dbus"? Is this API useable?

Inkscape is so amazing. I just wish I could send/receive values from verbs or an API. This would make it 100x more powerful for programming.

Any help is much appreciated.



Posts: 2650
Joined: Mon Oct 05, 2015 10:44 am

Re: How to free rotate an object programmatically?

Postby Moini » Sat Jul 14, 2018 9:43 am

Mmh, I've never seen that article. I have no idea what the current status is, but my gut feeling is that it's probably not going to be in a workable state. You could ask about it on the developer mailing list, if you want to get more qualified answers to that question.

Currently, you would need to use an extension to achieve that rotation from command line (Inkscape provides ready-made functions for it in 'module' files for extensions (simpletransform)). Passing values to extensions from the command line does not work yet, though. You could load the values from a file, if that would be an option. For example, the Inkscape Generator extension does that.
Note that if you are running an extension, you cannot suppress the Inkscape GUI.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests