With all objects still selected, I choose Path -> Simplify (Ctrl-L). But it feels weird to tell raphaël to draw different parts of a player all over the game board and then shift and resize them immediately.įortunately, I am able to get Inkscape to drop the transforms on all of the elements. I believe that I could get raphaël to honor a significant subset of Inkscape's transform attribute via the animate and scale methods (and I may give that a go another day). So the question now is, do I try to get raphaël to apply those transforms or do I try to get Inkscape to remove them? I opt for the latter. Inkscape applies the transform attribute whenever you move or resize an element. Originally, I had hoped that a flatten-layers option might solve the transformation issue-that the layers were somehow transformed relative to each other.Īfter some fiddling, I realize that this is not the case. With my "player" positioned starting from the top-left, I am ready to try to eliminate the transformation attribute from the generated SVG.
With all of the objects visible, I open the Align and Distribute Objects dialog, check the "Treat selection as group option", then align the elements to the top and left of the page: The easiest problem to solve is the positioning. Frustratingly, there is not a merge layers option in Inkscape, but I do without. The keyboard shortcut for this is Ctrl-Alt-A. My goal today is to eliminate both problems.įirst up, I select all objects in all layers (the legs & feet are in a different layer so I can draw walking). It is also a bit odd that the SVG elements are shifted down the page.
Continuing my Inkscape-to- raphaël.js work today, I pick up with attempting to fix this:Īs mentioned yesterday, I believe that misalignment is caused by the presence of transform attributes in the SVG code generated by Inkscape.