]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <mikayla-grace@urban-warrior.org>
Sat, 25 May 2019 16:45:23 +0000 (12:45 -0400)
committerCristy <mikayla-grace@urban-warrior.org>
Sat, 25 May 2019 16:45:23 +0000 (12:45 -0400)
MagickCore/draw.c
coders/icon.c
coders/svg.c

index 8406cf68c00b536ed9cf4ffa9c1a35de30056ab7..b57d60e447f73760d8686b0f304c6863fa13f010 100644 (file)
@@ -4291,6 +4291,7 @@ static MagickBooleanType RenderMVGContent(Image *image,
           primitive_info->point.x,primitive_info->point.y);
         clone_info->render=MagickFalse;
         clone_info->text=AcquireString(token);
+        (void) ConcatenateString(&clone_info->text," ");
         status&=GetTypeMetrics(image,clone_info,&metrics,exception);
         clone_info=DestroyDrawInfo(clone_info);
         cursor+=metrics.width;
index 80822e535b2d2795c4417e381c63896eb3717200..914b4f1cbbe4b89deaa51e20687c98908546750f 100644 (file)
@@ -953,8 +953,10 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
   next=(images != (Image *) NULL) ? images : image;
   do
   {
-    (void) WriteBlobByte(image,icon_file.directory[scene].width);
-    (void) WriteBlobByte(image,icon_file.directory[scene].height);
+   (void) WriteBlobByte(image,icon_file.directory[scene].width == 256 ? 
+      0 : icon_file.directory[scene].width);
+    (void) WriteBlobByte(image,icon_file.directory[scene].height == 256 ?
+      0 : icon_file.directory[scene].height);
     (void) WriteBlobByte(image,icon_file.directory[scene].colors);
     (void) WriteBlobByte(image,icon_file.directory[scene].reserved);
     (void) WriteBlobLSBShort(image,icon_file.directory[scene].planes);
index aa84088740b5a28d0919b7cd9f241dd13c423b38..6de7b3c38d6c07ad7d8182842230505c130c03b0 100644 (file)
@@ -1376,9 +1376,8 @@ static void SVGStartElement(void *context,const xmlChar *name,
         {
           if (LocaleCompare(keyword,"x") == 0)
             {
-              if (LocaleCompare((char *) name,"tspan") != 0)
-                svg_info->bounds.x=GetUserSpaceCoordinateValue(svg_info,1,
-                  value)-svg_info->center.x;
+              svg_info->bounds.x=GetUserSpaceCoordinateValue(svg_info,1,value)-
+                svg_info->center.x;
               break;
             }
           if (LocaleCompare(keyword,"x1") == 0)
@@ -1400,9 +1399,8 @@ static void SVGStartElement(void *context,const xmlChar *name,
         {
           if (LocaleCompare(keyword,"y") == 0)
             {
-              if (LocaleCompare((char *) name,"tspan") != 0)
-                svg_info->bounds.y=GetUserSpaceCoordinateValue(svg_info,-1,
-                  value)-svg_info->center.y;
+              svg_info->bounds.y=GetUserSpaceCoordinateValue(svg_info,-1,value)-
+                svg_info->center.y;
               break;
             }
           if (LocaleCompare(keyword,"y1") == 0)
@@ -1622,6 +1620,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
               char
                 *text;
 
+              SVGStripString(MagickTrue,svg_info->text);
               text=EscapeString(svg_info->text,'\"');
               (void) FormatLocaleFile(svg_info->file,"text %g,%g \"%s\"\n",
                 svg_info->bounds.x-svg_info->center.x,svg_info->bounds.y-
@@ -2326,8 +2325,8 @@ static void SVGStartElement(void *context,const xmlChar *name,
                         affine.ty=svg_info->bounds.y-x*
                           sin(DegreesToRadians(fmod(angle,360.0)))+y*
                           cos(DegreesToRadians(fmod(angle,360.0)));
-                        affine.tx-=x/2.0;
-                        affine.ty-=y/2.0;
+                        affine.tx-=x;
+                        affine.ty-=y;
                         break;
                       }
                     break;