Comments (2)
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
pat = cairo_pattern_create_radial(g.fx * -r, g.fy * -r, 0.,
t[4], t[5], r);
that makes all radial gradients shine!
from cairowidget.
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.
from cairowidget.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cairowidget.