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

Looking for a tool to convert something like

M10 20L0 0 5 5 10 10

from absolute to relative, something like:

M10 20l-10 -20 5 5 5 5

Pay attention to upper case L for absolute and lower case l for relative?

+4
source share
3 answers

A tool called Inkscape was found that allows you to preserve the relative.

For this:

  • New document, create a random pencil path and save the SVG. Close inkscape.
  • Edit the saved file in a text editor. Find and replace the path with a pencil in your path.
  • Open the document in Inkscape. Find and move your path. Save.
  • Edit the file again and find the new relative path.

TA-DAH

0
source
  • Open Inkscape and select File , Inkscape Settings (or Shift + Ctrl + P)
  • Select SVG Output
  • In the untick path data section Allow relative coordinates or choose to always use absolute coordinates depending on your version of inkscape.

    This will only affect newly created paths or existing objects for which rewriting of path data is initiated. For existing paths

  • Select Modify , then Select all in all layers .

  • Use the arrow key to push the selection (for example, one step up and one back). This will overwrite the path data in 'd', which will follow the changed settings for absolute path values.

This works for inkscape 0.48

+5
source

In the settings under "SVG Output", set the "Path Line Format" to "Absolute" and save as a regular SVG. You may need to push the object, so Inkskape will reset the 'd' attribute for the path.

+1
source

All Articles