From 68ae0ecd359f2303f7085623031f1e8f66dabb59 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 27 May 2018 18:08:21 -0400 Subject: [PATCH] ... --- MagickCore/draw.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 78086dcec..3b3a2ba5c 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -2787,11 +2787,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, (void) DrawPatternPath(image,draw_info,token, &graphic_context[n]->fill_pattern,exception); else - { - status&=QueryColorCompliance(token,AllCompliance, - &graphic_context[n]->fill,exception); - graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; - } + status&=QueryColorCompliance(token,AllCompliance, + &graphic_context[n]->fill,exception); break; } if (LocaleCompare("fill-opacity",keyword) == 0) @@ -3239,6 +3236,9 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, } if (LocaleCompare("graphic-context",token) == 0) { + graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; + graphic_context[n]->stroke.alpha= + graphic_context[n]->stroke_alpha; n++; graphic_context=(DrawInfo **) ResizeQuantumMemory( graphic_context,(size_t) (n+1),sizeof(*graphic_context)); @@ -3436,12 +3436,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, (void) DrawPatternPath(image,draw_info,token, &graphic_context[n]->stroke_pattern,exception); else - { - status&=QueryColorCompliance(token,AllCompliance, - &graphic_context[n]->stroke,exception); - graphic_context[n]->stroke.alpha= - graphic_context[n]->stroke_alpha; - } + status&=QueryColorCompliance(token,AllCompliance, + &graphic_context[n]->stroke,exception); break; } if (LocaleCompare("stroke-antialias",keyword) == 0) @@ -3721,6 +3717,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, } if (status == MagickFalse) break; + graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha; + graphic_context[n]->stroke.alpha=graphic_context[n]->stroke_alpha; if ((fabs(affine.sx-1.0) >= DrawEpsilon) || (fabs(affine.rx) >= DrawEpsilon) || (fabs(affine.ry) >= DrawEpsilon) || (fabs(affine.sy-1.0) >= DrawEpsilon) || -- 2.40.0