From: Cristy Date: Sun, 27 May 2018 22:55:03 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.7-36~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=419f6e9a98bf6085b3b769cd5dbc72c73fa853e4;p=imagemagick ... --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index acc9513cb..784de9b64 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -2790,7 +2790,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, { status&=QueryColorCompliance(token,AllCompliance, &graphic_context[n]->fill,exception); - graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; + if (graphic_context[n]->fill_alpha != OpaqueAlpha) + graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; } break; } @@ -2808,7 +2809,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, if (token == next_token) ThrowPointExpectedException(token,exception); graphic_context[n]->fill_alpha*=opacity; - graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; + if (graphic_context[n]->fill_alpha != OpaqueAlpha) + graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; break; } if (LocaleCompare("fill-rule",keyword) == 0) @@ -3037,9 +3039,11 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, if (token == next_token) ThrowPointExpectedException(token,exception); graphic_context[n]->fill_alpha*=opacity; - graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; + if (graphic_context[n]->fill_alpha != OpaqueAlpha) + graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; graphic_context[n]->stroke_alpha*=opacity; - graphic_context[n]->stroke.alpha=graphic_context[n]->stroke_alpha; + if (graphic_context[n]->stroke_alpha != OpaqueAlpha) + graphic_context[n]->stroke.alpha=graphic_context[n]->stroke_alpha; break; } status=MagickFalse; @@ -3439,8 +3443,9 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, { status&=QueryColorCompliance(token,AllCompliance, &graphic_context[n]->stroke,exception); - graphic_context[n]->stroke.alpha= - graphic_context[n]->stroke_alpha; + if (graphic_context[n]->stroke_alpha != OpaqueAlpha) + graphic_context[n]->stroke.alpha= + graphic_context[n]->stroke_alpha; } break; } @@ -3565,7 +3570,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, if (token == next_token) ThrowPointExpectedException(token,exception); graphic_context[n]->stroke_alpha*=opacity; - graphic_context[n]->stroke.alpha=graphic_context[n]->stroke_alpha; + if (graphic_context[n]->stroke_alpha != OpaqueAlpha) + graphic_context[n]->stroke.alpha=graphic_context[n]->stroke_alpha; break; } if (LocaleCompare("stroke-width",keyword) == 0)