zathras / jovial_svg

Flutter library for robust, efficient rendering of SVG static images
BSD 3-Clause "New" or "Revised" License
113 stars 21 forks source link

css stop-color values not applying #117

Closed jimmyff closed 1 month ago

jimmyff commented 1 month ago

Created an issue to track the painting issue found during #112 discussion. It seems that jovial isn't picking up the css stop-color values as expected:

Expected rendering: Screenshot 2024-09-12 at 17 05 32

Jovial rendering: Screenshot 2024-09-12 at 17 01 41

svg source ```xml ```
zathras commented 1 month ago

Thanks for writing this up. This is more of an RFE. Full support of all of CSS has always been an explicit non-goal of jovial_svg. Notably, the initial intent didn't go beyond setting the rendering attributes of nodes that are rendered. That said, extending it out to the stop definition of a gradient isn't unreasonable, and probably falls on the side of what it makes sense to add.

jimmyff commented 1 month ago

That would be really great. After fill and stroke, I would think stop-color is next most important css color related definition that would assist with scripting and svg manipulation. It would certainly be a big help for my project.

jimmyff commented 1 month ago

Just tested this and it seems to work great! 👏

Thanks @zathras

zathras commented 1 month ago

Published in 1.1.23