From aae96e5998971764de34a5e1755a8b27568e5605 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 15 Nov 2023 20:39:06 -0500 Subject: [PATCH] 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. --- src/svgtiny.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.44.2