Giter VIP home page Giter VIP logo

Comments (2)

brummer10 avatar brummer10 commented on May 29, 2024

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.

user1095108 avatar user1095108 commented on May 29, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.