]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Tue, 20 Sep 2016 00:07:29 +0000 (20:07 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 20 Sep 2016 00:08:06 +0000 (20:08 -0400)
MagickCore/draw.c
coders/svg.c

index 7fc3bf65faa4f8ac18b4d710acc42cf79807c72e..c14781851fd0e7c9112d6fd6f4c715ff47461ddc 100644 (file)
@@ -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;
index 727a2556393954e529a2b39b3909d8b9c8aa610f..49da9367c5685191f227a2238887653dca222c32 100644 (file)
@@ -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;
           }