Extensions and user-units in 0.92 vs earlier

Asked by Pelle Nilsson on 2017-01-06

I have written two extensions that worked in 0.91 and earlier versions, but after updating to 0.92 both have issues with getting coordinates correctly for positioning (translating) objects.

They fail in different ways depending on if the document was created in 0.92 or in 0.91. If I create a new document in 0.92 then all coordinates without unit-specifiers will be in mm for A4 documents or pt for letter-size document. For documents created with 0.91 or earlier units are now in 1/96 of inches, but my extensions have issues with things being off by a factor of 90/96. So for all documents there are failures in 0.92, but not they fail in different ways.

I put some more information in a thread on the inkscape forums:


Extensions in question:


I can probably sort this out by trial-and-error, trying to identify what version of inkscape is used and what version was used to create the file, then scale all my coordinates differently, but it would be nice to instead get some clarification of how an extension is supposed to handle units properly to work with different versions (hopefully even future versions). Maybe the way to do it properly will work for all the different cases without having to identify any versions at all?

I saw http://wiki.inkscape.org/wiki/index.php/Units_In_Inkscape but there is nothing about how the changes in user-units affects extensions there.

Question information

English Edit question
Inkscape Edit question
No assignee Edit question
Last query:
Last reply:
Hachmann (marenhachmann) said : #1

Pelle, if you don't get an answer here, please ask on the devel mailing list or in the chat, as was suggested in the forum.

Just an idea: has the file you're working on been converted to use the 96dpi?

Launchpad Janitor (janitor) said : #2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.