]> gitweb.michael.orlitzky.com - libsvgtiny.git/commitdiff
include/svgtiny.h: add fill_opacity and stroke_opacity to svgtiny_shape
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 16 Nov 2023 01:37:57 +0000 (20:37 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 20 Nov 2023 16:42:58 +0000 (11:42 -0500)
We already have fields for the fill and stroke opacity in the parser
state, but we have no way to record those values in the shapes we're
creating as we parse. Here we make room to do that.

include/svgtiny.h

index d44e8119372ffd2c4cd2e5e10422a8fc11df18e6..094d58f3ed403e03a62936cb543760804492d7ec 100644 (file)
@@ -28,7 +28,9 @@ struct svgtiny_shape {
        char *text;
        float text_x, text_y;
        svgtiny_colour fill;
+       float fill_opacity;    /* Between 0.0 and 1.0 */
        svgtiny_colour stroke;
+       float stroke_opacity;  /* Between 0.0 and 1.0 */
        int stroke_width;
 };