0

I loaded up a simple triangle in Inkscape which looked like this:

<?xml version="1.0" encoding="UTF-8"?>
<svg width="100" height="100" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <polygon points="20 20 80 20 50 80" fill="#fff"/>
</svg>

after resizing it a bit, I get the following output:

<?xml version="1.0" encoding="UTF-8"?>
<svg width="100" height="100" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <polygon transform="matrix(1 0 0 .43775 0 28.595)" points="20 20 80 20 50 80" fill="#fff"/>
</svg>

Is it possible to save the SVG such that the points has the matrix transformation applied to it? For example, doing the transformation above by hand, it should have the following output:

<?xml version="1.0" encoding="UTF-8"?>
<svg width="100" height="100" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <polygon points="20 37.35 80 37.35 50 63.635" fill="#fff" />
</svg>

I tried playing around with the matrix options, operations here only appear to modify the transformation definition instead of being applied to the actual vertices:

matrix options

1 Answer 1

2

In the preferences under 'Behavior → Transforms' make sure the 'Store transformation' option is set to 'Optimized' to make Inkscape manipulate coordinates directly, if possible, and less likely to add a transform-attribute.

If you want to apply an already added transform, sometimes grouping and ungrouping helps, but there is also the 'Apply Transforms' extension available for this purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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