]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/330
authorCristy <urban-warrior@imagemagick.org>
Mon, 26 Dec 2016 14:16:54 +0000 (09:16 -0500)
committerCristy <urban-warrior@imagemagick.org>
Mon, 26 Dec 2016 14:16:54 +0000 (09:16 -0500)
MagickCore/draw.c

index 96b6be6e8a62df3c769ed6bde95586058cecfdac..36a15b84288354ebaccea704ab8f988401c68930 100644 (file)
@@ -2233,6 +2233,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]->alpha=QuantumRange*(1.0-(QuantumScale*
+              graphic_context[n]->alpha*(1.0-factor*StringToDouble(token,
+              &next_token))));
             graphic_context[n]->fill_alpha=QuantumRange*(1.0-(QuantumScale*
               graphic_context[n]->fill_alpha*(1.0-factor*StringToDouble(token,
               &next_token))));
@@ -4952,6 +4955,7 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
     exception);
   draw_info->stroke_width=1.0;
   draw_info->fill_rule=EvenOddRule;
+  draw_info->alpha=OpaqueAlpha;
   draw_info->fill_alpha=OpaqueAlpha;
   draw_info->stroke_alpha=OpaqueAlpha;
   draw_info->linecap=ButtCap;