Bug 631885 - GIMP fails to import a path from SVG

If a moveto is followed by multiple pairs of coordinates, the
subsequent pairs are supposed to be treated as implicit lineto
commands.

The parser used to ignore this part of the SVG specification and
treated subsequent pairs of coordinates as moveto commands (which
is correct in general, but for moveto commands there is this
explicit exception of the general rule).
This commit is contained in:
Sven Neumann 2010-10-13 22:01:58 +02:00
parent 4236990351
commit beef765b4f
1 changed files with 5 additions and 0 deletions

View File

@ -1590,6 +1590,11 @@ parse_path_do_cmd (ParsePathContext *ctx,
ctx->strokes = g_list_prepend (ctx->strokes, ctx->stroke);
ctx->param = 0;
/* If a moveto is followed by multiple pairs of coordinates,
* the subsequent pairs are treated as implicit lineto commands.
*/
ctx->cmd = 'l';
}
break;