How to apply transforms to paths, rectangles etc.

Asked by shinyblue on 2017-03-13

Demo case (will attach svg): I have two rectangles with identical calculated sizes that I wish to apply the same filter to. Currently the filter comes out radically differently on each rectangle.

Excepting the demo case with two colour-filled rectangles, in my real world problem these numerous rectangles have been positioned and sized over many hours designing; they contain carefully positioned pattern fills.

The problem is that the rectangles (happy to use paths that describe rectangle but interested in both cases), which have been scaled as part of a group, have different co-ordinate lengths and transforms, even though the result of the combination of those is the same set of lengths. e.g. one might be d='m 0,0 v 1 h 1 v-1 z' with an identity/no transform, and the other might be d='m 0,0 v2 h2 v-2 z' with a transform that scales it 50%.

It seems the filters are applied on the pre-transformed size, meaning that when the filter is applied to the second it is "zoomed in", for want of a better description.

I've come across this problem lots of times, e.g. text sizes are another example, where you want to apply the scale transform to the actual lengths. For a path made of nodes, this seems at least a possibility for any transform matrix; I understand that you can't apply all transforms on other native objects like shapes or text.

Is there a way to do this sort of transform normalization?

Question information

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

Here's a demo SVG.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape ( -->

   viewBox="0 0 210 297"
   inkscape:version="0.92pre1 unknown"
         id="feFlood491" />
         id="feComposite493" />
         id="feGaussianBlur495" />
         id="feOffset497" />
         id="feComposite499" />
     showgrid="false" />
           rdf:resource="" />
        <dc:title />
     inkscape:label="Layer 1"
       d="m -977.61786,-145.28835 c 35.27777,0 70.55554,0 105.83331,0 0,22.8677 0,45.735387 0,68.603078 -35.27777,0 -70.55554,0 -105.83331,0 0,-22.867691 0,-45.735378 0,-68.603078 z"
       transform="matrix(0.87016183,0,0,0.87016183,851.28139,191.34918)" />
       d="m 1016.7031,-1313.5352 v 259.2872 h 400 v -259.2872 z"
       inkscape:connector-curvature="0" />

Hachmann (marenhachmann) said : #2

Sorry, don't have time to test this now, but there is an extension that applies transformations to objects:

Also see
and the extension can be found at:

Kind Regards,

Can you help with this problem?

Provide an answer of your own, or ask shinyblue for more information if necessary.

To post a message you must log in.