]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 24 Nov 2011 18:56:11 +0000 (18:56 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 24 Nov 2011 18:56:11 +0000 (18:56 +0000)
coders/svg.c

index bd62d50ce7420596d8859d663ac17bb2d9eb5973..4275deb171c7a603c31996cb0f4b40699339b169 100644 (file)
@@ -1092,6 +1092,10 @@ static void SVGStartElement(void *context,const xmlChar *name,
       if (LocaleCompare((const char *) name,"text") == 0)
         {
           (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
+          svg_info->bounds.x=0;
+          svg_info->bounds.y=0;
+          svg_info->bounds.width=0;
+          svg_info->bounds.height=0;
           break;
         }
       if (LocaleCompare((const char *) name,"tspan") == 0)
@@ -2403,7 +2407,8 @@ static void SVGEndElement(void *context,const xmlChar *name)
                 *text;
 
               text=EscapeString(svg_info->text,'\'');
-              (void) FormatLocaleFile(svg_info->file,"text 0,0 '%s'\n",text);
+              (void) FormatLocaleFile(svg_info->file,"text %g,%g '%s'\n",
+                svg_info->bounds.x,svg_info->bounds.y,text);
               text=DestroyString(text);
               *svg_info->text='\0';
             }