[cairo] [RFC] Color space API (partial proposal)

James Cloos cloos at jhcloos.com
Fri Feb 26 08:53:37 PST 2010


>>>>> "Adrian" == Adrian Johnson <ajohnson at redneon.com> writes:

Adrian> The tint transform will map tint values between 0 and 1 to the
Adrian> linear interpolation between first_color and second_color.

The more general solution would be to specify the tint transform as a
gradient.  The tint transform functions and gradient functions are at
least essentially the same—perhaps even exactly the same—concept.

And a type7 gradient can make for a reasonably convincing alternate for
things like metalic, opalescent, iridescent spots or glossy overcoats.
(Not exact, of course, but not unreasonable either.)

Which begs the question of when the type6/7 gradient code will be added. ☺

But anyway.

Since it takes several API calls to build up a gradient, I suspect that
cairo should demand that the colour stops in a given gradient all be in
the same colour space, thus the API for specifying the alternate colour
should not need to specify the alternate's space explicitly.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6


More information about the cairo mailing list