SVG path
Read an SVG path's commands in plain terms, measure it, and shrink it without changing the shape.
Measured by arc length, not by command, so the marker moves at a constant speed even where the curve bunches up. Heading -13.5°.
Pick a command to light up everything drawn up to that point. The square handles are control points, the round ones are anchors.
M 100 170 C 40 130 10 90 10 60 A 30 30 0 0 1 70 45 A 30 30 0 0 1 100 60 A 30 30 0 0 1 130 45 A 30 30 0 0 1 190 60 C 190 90 160 130 100 170 Z
Exactly the commands you wrote, spaced out one per line.
M100 170C40 130 10 90 10 60A30 30 0 0170 45a30 30 0 0130 15 30 30 0 0130-15 30 30 0 0160 15c0 30-30 70-90 110z
30 bytes lighter — 21.4% off 140. Separators are dropped wherever a sign or a decimal point can do the job, repeated command letters are left out, and arc flags are packed against their neighbours.
A path's `d` attribute is a dense string of single letters and numbers. Working out what it draws, or where a stray command went wrong, means parsing it by hand.
Paste a path and each command is broken out and named, with the bounding box and total length. Minifying strips redundant precision and whitespace, which on an icon set is a meaningful saving, and the preview confirms the shape survived.
What people open it for
- Understanding or repairing a hand-edited SVG path
- Reducing decimal precision to shrink an icon
- Finding the bounding box or length of a path
In the terminal
tools svgpath
Every utility is also a command in the desktop's shell.