[cairo] Path Gradients
cworth at cworth.org
Mon Jan 21 10:24:44 PST 2008
[Sorry I missed this email earlier.]
On Fri, 4 Jan 2008 12:57:27 -0800, MenTaLguY wrote:
> Well, very specifically I'm referring to Postscript Type 6 shadings, which
> are fairly well-specified in the PLRM. They are present in Adobe Illustrator
> as "gradient meshes".
Whenever people come up with interesting gradient types, (like path
gradients or whatever), what I've always wanted to provide in cairo is
a single fully-general gradient. That way, people that want to do
something like a path gradient, (to emulate some other
poorly-specified system say), can implement that on top of cairo's
And in skimming through the PostScript manual, I've always assumed
that one of the fancy gradient types there would be suitable.
But at the same time, I've known that Adobe Illustrator provides a
sophisticated "gradient mesh" tool, and we'd definitely want to
provide compatibility with that.
What I didn't know is which PostScript gradient type (if any)
corresponded to the Adobe Illustrator gradient mesh. So thanks for
So implementing a new cairo API to provide PostScript Type 6 shadings
sounds like an excellent thing to me. I might be able to put some work
toward this after cairo 1.6.
> The main thing is that a bit of care is required when they are used with
> alpha; patches comprising a mesh cannot be individually rendered with
> porter-duff compositing due to problems with seams which have already
> been exhaustively discussed on this list, as well as certain other
> rendering ambiguities which have not.
And this part of the work sounds like lots of fun!
PS. And we might even have a first test case, too. It looks like
pidgin, (a GPL jabber client), managed to get its logo drawn in Adobe
Illustrator such that no free-software renderer can render it
correctly. See this poppler bug here:
Example of faulty gradient rendering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080121/af49d552/attachment.pgp
More information about the cairo