On 22/11/11 11:11, Jasper van de Gronde wrote:
On 22-11-11 08:29, Paul Whipp wrote:
... I need to be able to click a button (or set a preference) so that these static transforms (which accumulate) are applied to the attributes and then removed such that the svg is left in a simpler but graphically identical state.
Is there some 'standard' or known way to achieve this simplification that I am missing? I will happily RTFM if pointed in the right direction
- 'I've tried googling to no avail.
There is an option in the Inkscape preferences (under Transforms), called "Store transformation", set it to "Optimized". This will only affect shapes that you change afterwards, but it might even be enough to scale everything to 100% (so nothing should change) to make this happen, or move everything to the right and back again, or something equally trivial.
But AFAIU this setting [1] does not affect moving of groups (or shapes like ellipses/circles and stars/polygons): these types of objects always use a preserved 'translate' transform attribute. The original question was related to a group:
I stick a text object over the rectangle and group them together. Now I move the group and I get a "transform = translate(188.98349, -58.129834)" attribute associated with the group rather than the x,y positions being updated as I want.
For groups, to flatten the transform, ungroup the moved group, and regroup it (keep the same selection) - it's done rather quickly with keyboard shortcuts Ctrl+U, Ctrl+G. Watch out for transforms of parent groups (if nested), though and transforms on parent layers (after resizing the page or changing its orientation).
Note: inkscape shapes (ellipse/circle, star/polygon) inside the group will inherit the transform attribute from the parent group when ungrouping: to use optimized transforms for all objects (the group and its members), convert the shapes to path (menu 'Path > Object to Path') and nudge them with the arrow keys up and down again to trigger a rewrite of the path information with optimized transforms, before grouping them again.
hth, ~suv
[1] 'Optimized' is the default setting BTW (affects regular paths & rectangles).