New unstable version of Cairo features mesh gradients

New unstable version of Cairo features mesh gradients

That's right: one of the most important changes in this new unstable version of Cairo library is support for gradient meshes, or, for precision's sake, bezier surface gradients known as type 6/7 gradients in the PS/PDF specs. Implementation was done by Adrian Johnson and Andrea Canciani.

Cairo, a widely adopted 2D graphics library, is behind many things in free applications and desktop environments. It's also directly used by graphic design tools such as Inkscape, sK1 and Scribus.

For Scribus project Cairo-based meshes are not exactly news: internal copy of Cairo with implementation of meshes is used by Scribus since spring 2010. So Scribus team will only have to remove internal copy eventually — once new stable version of Cairo (1.12) is out.

For Inkscape the situation is quite different. As an SVG editor, Inkscape relies on its superset of the SVG markup. However, the rule is that Inkscape should create SVG files that will render anywhere, and creating fallbacks for gradient meshes is either difficult or adds up to the file size considerably. The future version of SVG specification (one of its modules, actually) will probably describe meshes, but it's yet to be decided if those will be the meshes as per PDF spec or the so called diffusion curves, on which Jasper van de Gronde has been slowly working since last year.

Developers of sK1, a free vector graphics editor that makes use of Cairo, haven't commented yet, whether they are planning to implement meshes. Even if they do, that probably won't happen too soon, because they are facing a huge code refactoring at the moment.

There are even more interesting changes in the new Cairo's version:

  • cairo-xcb backend is seeing some love by Uli Schlachter who aims to make it a supported backend for 1.12;
  • cairo-gl is being prepared to support GLESv2 devices, Alexandros Frantzis is in charge for that;
  • various fixes, but one of them is especially interesting, because it finally makes it possible to merge a GSoC2010 project of Inkscape that implements threaded rendering of SVG Filters via Cairo.

You can download this unstable version.

Was it useful? There's more:

0 Responses. Comments closed for this entry.