gotcha

Author Topic: How to apply the outer group transformation to newly created objects?  (Read 556 times)

October 17, 2018, 02:15:07 AM
Read 556 times

Sylvain Leroux

  • Newbie

  • Offline
  • *

  • 1
Hi everyone,

I'm an Inkscape user for years now and I usually find the answers I need by Googling. But this time, I'm out of luck, so here I come:

When you apply a rotation to a group, Inkscape is smart enough to apply the inverse transformation when you create a rectangle or text inside that group, so the newly created object remains parallel to the edges of the page.

But sometimes this behavior is not desirable. So is there a way to disable that behavior to create objects in such a way the outer group transformation will be applied to them?
For now, the only workaround I found was to create the object as usual, then open the XML editor to remove the inverse transformation matrix added to them.



As an example, in the attached screenshot, I'm "inside" a group having the following transformation: `matrix(0.96592583,-0.25881905,0.25881905,0.96592583,635.72819,829.6563)` (a rotation and a translation). Inside that group, if I create a text, Inkscape attach the inverse rotation to it: `matrix(0.96592582,0.25881905,-0.25881905,0.96592582,0,0)` so the text baseline remains parallel with the page edges (image 1). If I want my text to be parallel with the small rects inside the group, I have to remove that extra transformation (image 2). After having removed the transformation matrix, I also need to adjust the newly created object's position since it moved. All that makes that workflow quite clumsy.

Any suggestion for a more straightforward workflow?

  • 0.91
  • Linux Debian / Elementary OS

October 18, 2018, 07:54:27 AM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Mmh, no, I don't currently know of a way to achieve that (except for rotating the group only when you've got all the elements in it).

Although, there's an extension that can remove transforms... Ah, here it is:

https://inkscape.org/~Klowner/%E2%98%85apply-transforms

It's meant to apply the transform and convert any shape to a path, however, a buggy version just removed transforms. Maybe you can use that bug to your advantage? You could ask the extension owner about making that a feature ;-)