X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fsvgtiny_internal.h;h=a7d0499439b57cc234b851aa2606a415703d58b9;hb=eb882b3212a23ece39c714311c5bc3d58cf07074;hp=ba0db7029b30d719dc74d2dd401fdce9d1de0ac7;hpb=545123c6ec9a3d3903e713c1c2919762417538dd;p=libsvgtiny.git diff --git a/src/svgtiny_internal.h b/src/svgtiny_internal.h index ba0db70..a7d0499 100644 --- a/src/svgtiny_internal.h +++ b/src/svgtiny_internal.h @@ -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; @@ -102,6 +110,10 @@ char *svgtiny_strndup(const char *s, size_t n); /* svgtiny_css.c */ css_error svgtiny_create_stylesheet(css_stylesheet **sheet, bool inline_style); +css_error svgtiny_select_style(struct svgtiny_parse_state *state, + dom_element *node, + const css_stylesheet *inline_sheet, + css_select_results **result); /* svgtiny_gradient.c */ void svgtiny_find_gradient(const char *id,