[cairo] Path Gradients

Bobby Salazar bobby8934 at inbox.com
Tue Jan 22 09:50:58 PST 2008


Carl, do you (or anyone else) know where I can go to read up about these "Type 6" shadings? I would be interested in learning more about them and what kind of things are possible with them. Thanks!

> -----Original Message-----
> From: cworth at cworth.org
> Sent: Mon, 21 Jan 2008 10:24:44 -0800
> To: mental at rydia.net
> Subject: Re: [cairo] Path Gradients
> 
> [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".
> 
> Thank you!
> 
> 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
> gradient.
> 
> 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
> specifying that.
> 
> 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!
> 
> -Carl
> 
> 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
> 	https://bugs.freedesktop.org/show_bug.cgi?id=14160


More information about the cairo mailing list