From: Michael Orlitzky Date: Thu, 16 Nov 2023 01:39:06 +0000 (-0500) Subject: src/svgtiny.c: set shape opacities from the parser state X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=aae96e5998971764de34a5e1755a8b27568e5605;p=libsvgtiny.git src/svgtiny.c: set shape opacities from the parser state Record the "active" fill and stroke opacity from the parser state in each shape that we create. --- diff --git a/src/svgtiny.c b/src/svgtiny.c index 3ad6eec..74ce7eb 100644 --- a/src/svgtiny.c +++ b/src/svgtiny.c @@ -2447,6 +2447,8 @@ struct svgtiny_shape *svgtiny_add_shape(struct svgtiny_parse_state *state) shape->text = 0; shape->fill = state->fill; shape->stroke = state->stroke; + shape->fill_opacity = state->fill_opacity; + shape->stroke_opacity = state->stroke_opacity; shape->stroke_width = lroundf((float) state->stroke_width * (state->ctm.a + state->ctm.d) / 2.0); if (0 < state->stroke_width && shape->stroke_width == 0)