From f9b1b4fa2f7a48221595a1560131aded5674a824 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 26 Dec 2016 09:16:54 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/330 --- MagickCore/draw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 96b6be6e8..36a15b842 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -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; -- 2.40.0