Mesh gradients accepted to SVG 2.0, initially supported by Inkscape

Mesh gradients accepted to SVG 2.0, initially supported by Inkscape

SVG working group has accepted proposal to include mesh gradients into upcoming SVG 2.0 standard. The proposal was suggested and worked on by Tavmjong Bah, one of Inkscape developers.

There are different approaches to mesh gradients. Tav has chosen Coons patch meshes which allow creating complex effects, including conical gradients simulation (another requested feature), and already are implemented in Cairo — the 2D vector graphics library that Inkscape now uses for rendering. That Cairo feature is also used by unstable version of Scribus for mesh gradients.

Conical gradients simulated via Coons patch mesh

What's more interesting is that for testing purposes Tav patched Inkscape to support mesh gradients. The patched version will be publicly available shortly.

Arbitrary mesh gradient in Inkscape

There is still some work that has to be done to improve the proposal. The committee's decision was that the case of a mesh matching an object should be addressed, and for that the mesh proposal has to be updated to make the mesh both a geometric primitive and a paint server.

Apart from that mesh gradients code in Cairo has to be patched to fix errors that lead to Inkscape crashes in some cases.

At this moment it isn't quite clear if mesh gradients will be part of Inkscape 0.49. However since there already is existing code, it will be much easier to integrate it. Expect updates on the story.

Was it useful? There's more:

2 Responses. Comments closed for this entry.

  1. I highly doubt we will see it in 0.49, as I understand it, there is no UI to create or edit meshes in Tav’s version, only the ability to render them. I would accept it in a heartbeat though if it was stable enough. However, given the need for patching upstream cairo, that makes it even more unlikely for 0.49 imho. I’ve lost hope that we’ll even see cairo 1.12 released by the upcoming distro cutoff dates.

  2. Yes, Cairo is a problem. And I don’t really think that without UI it would make a llot f sense to ship any support for mesh gradients.