From: Cristy Date: Tue, 20 Sep 2016 00:07:29 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.3-1~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b529843a3caf7e900a404f22720126b319f5091c;p=imagemagick ... --- 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; }