]> gitweb.michael.orlitzky.com - libsvgtiny.git/commit
src/svgtiny.c: parse styles in svgtiny_parse_paint_attributes()
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 18 Oct 2023 00:09:42 +0000 (20:09 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 20 Nov 2023 16:42:58 +0000 (11:42 -0500)
commit0312d7177af048a89e0259f78bceda9123b517fc
tree9397b9812cdae3a20648e11f2838f5e4ed319392
parentdb526eaa10e6072f43f57298df1cfea0377ae7a4
src/svgtiny.c: parse styles in svgtiny_parse_paint_attributes()

Now that the scaffolding is in place, we do the work to parse our two
supported CSS paint attributes, fill-opacity and stroke-opacity. This
amounts to,

  * Calling svgtiny_select_style(), which is just a wrapper around
    css_select_style()
  * Passing the result to css_computed_foo_opacity() to get the
    computed styles
  * Populating fill_opacity and stroke_opacity in the parser state
    if the corresponding styles exist

There's also a temporary hack to avoid crashing on the root node that
later goes away when we implement parent/child style composition.
src/svgtiny.c