0

I want to be able to edit my objects through code. But it seems that Inkscape, for some strange reason, thinks that all properties in svg's XML are in mm. I've set Grid Units to px, I checked if Display Units is px. If I go to XML Editor and try to change, let's say, height or style (stroke-width, for example), Inkscape thinks this value is in mm, even if I type px after a number. I'm newbie with this software, am I missing something?

Example

0

You can.

Option a) (new file):

File > New from Template > default px

Option b) (existing file):

File > Document properties:

  1. Set Display units to px
  2. Set Scale to 1

Note: this option will change the size and location of all elements in your drawing, you will need to resize afterwards.

Note: Objects that are in groups that are resized (i.e. have a transform attribute for the group) will still not have their size indicated in px in the xml, you would need to ungroup, or remove the transform (using an extension downloadable from the Inkscape website, for example).

  • 1
    Thank you, that did the trick. I wasn't aware of what's this Scale option doing. I changed default.svg template accordingly, and now it works as I need it to. – splinefx Dec 14 '18 at 9:44

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.