]> gitweb.michael.orlitzky.com - libsvgtiny.git/blobdiff - src/svgtiny_internal.h
src/svgtiny_internal.h: add parent style to the parser state
[libsvgtiny.git] / src / svgtiny_internal.h
index 6d716f535e1a171b350aacd7d4a8880692cf4e47..a7d0499439b57cc234b851aa2606a415703d58b9 100644 (file)
@@ -54,11 +54,19 @@ struct svgtiny_parse_state {
         * precede it. */
        css_select_ctx *select_ctx;
 
+       /* Keep track of the parent element's computed style so that
+        * we can compose its children's computed styles with it. */
+       css_computed_style *parent_style;
+
        /* paint attributes */
        svgtiny_colour fill;
        svgtiny_colour stroke;
        int stroke_width;
 
+       /* alpha */
+       float fill_opacity;
+       float stroke_opacity;
+
        /* gradients */
        struct svgtiny_parse_state_gradient fill_grad;
        struct svgtiny_parse_state_gradient stroke_grad;