Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numerals separated by hyphens

Tags:

svg

I came across an SVG optimizer optimizer online that rounds off path coordinates.

The bezier path coordinates take a strange numbering format, with single numerals separated by hyphens. The first coordinate is a normal number, but the rest are special.

m161 141c7 0 7-5 5-7-2-2-2-7 5-7 7 0 7 5 5 7-2 2-2 7 5 7 3 0 9-1 9-1 0 0 1 6 1 9 0 7-5 7-7 5-2-2-7-2-7 5 0 7 5 7 7 5 2-2 7-2 7 5 0 3-1 9-1 9 0 0-6-1-9-1-7 0-7 5-5 7 2 2 2 7-5 7-7 0-7-5-5-7 2-2 2-7-5-7-3 0-9 1-9 1 0 0-1-6-1-9 0-7 5-7 7-5 2 2 7 2 7-5 0-7-5-7-7-5-2 2-7 2-7-5 0-3 1-9 1-9 0 0 6 1 9 1z

What is this number format called?

like image 392
Iktys Avatar asked May 01 '14 06:05

Iktys


1 Answers

Commas and whitespace are optional in paths. Therefore 7-5 should be interpreted as 7 followed by -5.

The rule is pretty much consume what you can till you get to something that can't be part of the current token, then start a new token.

like image 62
Robert Longson Avatar answered Nov 15 '22 10:11

Robert Longson