This project is read-only.

Bugs in SvgPathBuilder: Coordiantes with e-format


I converted a JPG to SVG with Inksape 0.91. The format of one of the coordinates was "10e-4". "e" ist interpretet as command in function "SplitCommands". The Line
"if (char.IsLetter(path[i]))"
has to be replaced by
"If Char.IsLetter(Path.Chars(mI)) And Char.ToLower(Path.Chars(mI)) <> "e" Then"
(This is the Visual Basic translation. I am not familiar wit c#)

file attachments


UlliBien wrote Mar 18, 2015 at 3:38 AM

(Sorry, I hit a wrong key.)

There ist another spot that has to be modified. In function "ParseCoordinates" the line
"var parts = coords.Remove(0, 1).Replace("-", " -").Split(new[] { ',', ' ', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);"
results 10e-4 to converted into "10e -4" that will be interpreted as two values by the following "Split" function. It has to be replaces by
... Replace("-", " -").Replace("e -", "e-").Replace("E -", "E-").

I added the file as attachement.