Skip to content

Commit

Permalink
Combine the logic of stroke-opacity and fill-opacity in opacity to re…
Browse files Browse the repository at this point in the history
…solve #7301.
  • Loading branch information
dlemstra committed May 9, 2024
1 parent b9dc200 commit aecccca
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions MagickCore/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3248,6 +3248,20 @@ static MagickBooleanType RenderMVGContent(Image *image,
graphic_context[n]->fill_alpha=(double) QuantumRange*opacity;
graphic_context[n]->stroke_alpha=(double) QuantumRange*opacity;
}
if (graphic_context[n]->fill.alpha != (double) TransparentAlpha)
{
graphic_context[n]->fill.alpha=graphic_context[n]->fill_alpha;
graphic_context[n]->stroke.alpha=graphic_context[n]->stroke_alpha;
}
else
{
graphic_context[n]->fill.alpha=(MagickRealType)
ClampToQuantum((double) QuantumRange*opacity);
graphic_context[n]->stroke.alpha=(MagickRealType)
ClampToQuantum((double) QuantumRange*opacity);
}
graphic_context[n]->fill.alpha_trait=BlendPixelTrait;
graphic_context[n]->stroke.alpha_trait=BlendPixelTrait;
break;
}
status=MagickFalse;
Expand Down

0 comments on commit aecccca

Please sign in to comment.