[cairo] Mesh gradients
ranma42 at gmail.com
Thu Dec 23 12:33:33 PST 2010
I have cleaned up the code and the documentation of mesh patterns.
The updated branch is
The code and the comments should be fine. The latest commits should be
squashed into the commits they are fixing and most commit messages should
be rewritten. I'll fix this in another branch soon-ish.
I uploaded the documentation here:
It needs to be reviewed, both for the content and the language used (I'm not a
native English speaker), but it should be consistent and complete.
I put cairo_pattern_mesh_* functions in the same page as
but maybe they should belong to a different page.
I would like to add that testing PDF containing mesh patterns pointed out
problems in most implementations. I uploaded the interesting part of the output
of the cairo test suite here:
mesh-pattern-fold shows that poppler and Apple Preview do not handle
mesh-pattern-accuracy shows that Adobe Reader and Apple Preview split
only based on the shape, but they don't guarantee that the splits are
sufficient to have
an accurate approximation of the bezier patch using Gouraud shaded triangles.
The new rasterizer implemented in cairo and the rasterizer available
seem to handle these patterns better, but additional testing, both in
the form of meshes
which cairo is unable to rasterize correctly and in the form of
checking if other existing
implementations handle these PDF files correctly would be appreciated.
I have tested this branch on most backends (image, pdf, ps, recording,
xcb, quartz, gl, script) and it works as expected.
I would like this branch to be tested on all supported backends, but
I'm still unable to
test cairo-win32. Testing (even just that the code compiles with no
other backends is very welcome as well.
More information about the cairo