From: Michael Orlitzky Date: Sat, 7 Jun 2025 15:19:49 +0000 (-0400) Subject: src/svgtiny.c: set shape opacities from the parser state X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f8a66bc35921b6366b9d2130ddaa4e483633b8fe;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 361c43b..7794c6d 100644 --- a/src/svgtiny.c +++ b/src/svgtiny.c @@ -1400,6 +1400,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)