You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there
First, it's a really nice implementation for using nanosvg within cairo. Thanks for that.
I like to use it to add support for SVG in my X11 widget toolkit https://github.com/brummer10/libxputty
Therefore I ported it to plain C. However, I noticed a issue within your C++ version as well, with radial gradients and I don't know how to solve it. As a example, I use this one: https://freesvg.org/monarch-butterfly-2-variation-2
Unfortunately the radial gradients seems to didn't work, as all colours been presented as plain colour.
It works well for linear gradients by the way. Do you've any idea how to solve that?
regards
hermann
The text was updated successfully, but these errors were encountered:
So, I found the issue.
First we need to implement the pull request memononen/nanosvg#164 for nanosvg, then we need to change line 126 in caironanosvg.cpp to
I long suspected there might be issues with radial gradients. Now that you have spotted the error, I'll put your fix into CairoWidget and qtnanosvg, thank you. Previously, I only made a "best-effort" as regards radial gradients, as seemingly, there are problems within nanosvg itself and I use it only for generating icons, which means the .svgs I render are rather simple and usually contain no radial gradients. Even with radial gradients supported, nanosvg is rather incomplete, there is no filter support, for example. I am hoping for some other .svg library to emerge, but until then nanosvg will have to do.
Hi there
First, it's a really nice implementation for using nanosvg within cairo. Thanks for that.
I like to use it to add support for SVG in my X11 widget toolkit https://github.com/brummer10/libxputty
Therefore I ported it to plain C. However, I noticed a issue within your C++ version as well, with radial gradients and I don't know how to solve it. As a example, I use this one: https://freesvg.org/monarch-butterfly-2-variation-2
Unfortunately the radial gradients seems to didn't work, as all colours been presented as plain colour.
It works well for linear gradients by the way. Do you've any idea how to solve that?
regards
hermann
The text was updated successfully, but these errors were encountered: