From b529843a3caf7e900a404f22720126b319f5091c Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 19 Sep 2016 20:07:29 -0400 Subject: [PATCH] ... --- MagickCore/draw.c | 10 ++++++---- coders/svg.c | 12 ++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 7fc3bf65f..c14781851 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -2055,8 +2055,9 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, { GetNextToken(q,&q,extent,token); factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0; - graphic_context[n]->fill_alpha=(double) QuantumRange*(1.0-factor* - StringToDouble(token,&next_token)); + graphic_context[n]->fill.alpha=QuantumRange-ClampToQuantum( + (MagickRealType) QuantumRange*(1.0-factor*StringToDouble(token, + &next_token))); if (token == next_token) status=MagickFalse; break; @@ -2721,8 +2722,9 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, { GetNextToken(q,&q,extent,token); factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0; - graphic_context[n]->stroke_alpha=(double) QuantumRange*(1.0-factor* - StringToDouble(token,&next_token)); + graphic_context[n]->stroke.alpha=QuantumRange-ClampToQuantum( + (MagickRealType) QuantumRange*(1.0-factor*StringToDouble(token, + &next_token))); if (token == next_token) status=MagickFalse; break; diff --git a/coders/svg.c b/coders/svg.c index 727a25563..49da9367c 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -1252,9 +1252,9 @@ static void SVGStartElement(void *context,const xmlChar *name, (void) FormatLocaleFile(svg_info->file,"fill-rule '%s'\n",value); break; } - if (LocaleCompare(keyword,"fill-alpha") == 0) + if (LocaleCompare(keyword,"fill-opacity") == 0) { - (void) FormatLocaleFile(svg_info->file,"fill-alpha '%s'\n", + (void) FormatLocaleFile(svg_info->file,"fill-opacity '%s'\n", value); break; } @@ -1714,10 +1714,10 @@ static void SVGStartElement(void *context,const xmlChar *name, "fill-rule '%s'\n",value); break; } - if (LocaleCompare(keyword,"fill-alpha") == 0) + if (LocaleCompare(keyword,"fill-opacity") == 0) { (void) FormatLocaleFile(svg_info->file, - "fill-alpha '%s'\n",value); + "fill-opacity '%s'\n",value); break; } if (LocaleCompare(keyword,"font-family") == 0) @@ -3900,11 +3900,11 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image, (void) WriteBlobString(image,message); break; } - if (LocaleCompare("fill-alpha",keyword) == 0) + if (LocaleCompare("fill-opacity",keyword) == 0) { GetNextToken(q,&q,extent,token); (void) FormatLocaleString(message,MagickPathExtent, - "fill-alpha:%s;",token); + "fill-opacity:%s;",token); (void) WriteBlobString(image,message); break; } -- 2.50.1