Search code examples
svgline

Is there a tool to convert SVG line paths from absolute to relative?


Looking for a tool to convert something like

M10 20L0 0 5 5 10 10

from the absolute position to relative, something like:

M10 20l-10 -20 5 5 5 5

Notice the uppercase L for absolute and lowercase l for relative?


Solution

  • Found a tool called Inkscape which allows saving to relative.

    To do this:

    1. New document, create a random pencil path, and save the SVG. Close inkscape.
    2. Edit saved file in a text editor. Find and replace the pencil path with your path
    3. Re-open the document in Inkscape. Locate and move your path. Save.
    4. Edit the file again and look for the new relative path.

    TADA