From 3cc832a0a68946c33ec27dd9e9f51f1ec8d92e6e Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 25 May 2019 12:45:23 -0400 Subject: [PATCH] ... --- MagickCore/draw.c | 1 + coders/icon.c | 6 ++++-- coders/svg.c | 15 +++++++-------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 8406cf68c..b57d60e44 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -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; diff --git a/coders/icon.c b/coders/icon.c index 80822e535..914b4f1cb 100644 --- a/coders/icon.c +++ b/coders/icon.c @@ -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); diff --git a/coders/svg.c b/coders/svg.c index aa8408874..6de7b3c38 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -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; -- 2.40.0