[cairo] Cairo gradients and pre-mul data
Federico Mena Quintero
federico at ximian.com
Tue Jun 20 23:14:22 PDT 2006
On Tue, 2006-06-20 at 19:28 -0700, Keith Packard wrote:
> We recognised the limitations and inconsistency when this choice was
> made, but we did it for entirely practical reasons -- we wanted to
> implement SVG drawing with the cairo API, and non-premul gradient stops
> were required for this case. There's nothing preventing the addition of
> premultiplied gradient stops through an added API in the future; we just
> haven't found a significant need for it as yet.
Since I'm too lazy to figure out the math...
What's the premultiplied equivalent of a non-premult gradient from
(1, 0, 0, 0) to (1, 1, 1, 0)? I.e. transparent red to solid white. On
the GIMP this gives me a transparent-to-white gradient with a red tinge
in the middle section.
Would one need to overlay two premultiplied gradients or something like
that?
Federico
More information about the cairo
mailing list