[gimp] Bug 631885 - GIMP fails to import a path from SVG



commit beef765b4f4d0174f6886964b147f315b2f9b499
Author: Sven Neumann <sven gimp org>
Date:   Wed Oct 13 22:01:58 2010 +0200

    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).

 app/vectors/gimpvectors-import.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/app/vectors/gimpvectors-import.c b/app/vectors/gimpvectors-import.c
index a3b347b..3f76553 100644
--- a/app/vectors/gimpvectors-import.c
+++ b/app/vectors/gimpvectors-import.c
@@ -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;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]