Path positioning

Discuss SVG code, accessible via the XML Editor.
mbatic
Posts: 5
Joined: Sat Apr 24, 2010 5:41 am

Path positioning

Postby mbatic » Wed Apr 28, 2010 5:39 pm

I have a really noob-ish question, but I can't find an answer on the net...

I have a path, that is defined with absolute positioning (xml code with capital letters M, C, L, ...), but I would like (I need, actually) to have positions of path points defined relative (m, c, l, ...). Is there a way to do that in inkscape?

Best, etc
m

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Path positioning

Postby brynn » Thu Apr 29, 2010 9:53 am

FYI, I'm moving your topic the SVG/XML forum :D

btw, I'm not sure a question about XML code is newbish :lol:

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Path positioning

Postby ~suv » Thu Apr 29, 2010 7:04 pm

brynn wrote:FYI, I'm moving your topic the SVG/XML forum

Path data optimization and optionally using relative or absolute coordinates is part of Inkscape' s preferences for SVG output since 0.47 and can be changed using Inkscape's GUI.

mbatic wrote:I have a path, that is defined with absolute positioning (xml code with capital letters M, C, L, ...), but I would like (I need, actually) to have positions of path points defined relative (m, c, l, ...). Is there a way to do that in inkscape?

If you are using Inkscape 0.47, the default is to store the path data for new or edited objects in relative moves. When you load a drawing created by an older Inkscape version, another application or manually written in absolute moves, Inkscape doesn't rewrite the path data by itself unless you 'force' it to do so: select the object and for example move it up a step and back down (using the cursor keys). Now Inkscape will recalculate the moves and coordinates for each node and store the path data 'optimized' as relative and without repeating commands unnecessarily.

The options for path data are accessible in 'Inkscape Preferences > SVG output > Path data'. The release notes for Inkscape 0.47 describe the new features in the section 'Optimized path data'.

mbatic
Posts: 5
Joined: Sat Apr 24, 2010 5:41 am

Re: Path positioning

Postby mbatic » Fri Apr 30, 2010 1:43 am

Thanks.

I had in memory that moving the object around converted the positioning, but it didn't seem to work. Now I remember that happened on my work machine while now I am working with my netbook with 0.46 version.

Best etc,
m


Return to “SVG / XML Code”