[cairo] Cairo gradients and pre-mul data

Federico Mena Quintero federico at ximian.com
Wed Jun 21 11:14:46 PDT 2006


On Tue, 2006-06-20 at 23:55 -0700, Keith Packard wrote:

> The obvious alternative is to just add pre-multiplied color stops;
> computing the gradient with a combination of such stops should even be
> easy to define; the output is always a set of premultiplied values in
> any case.

I wonder what the most common usage cases will be.  Something like

1. Cairo as an engine for rendering SVG.

2. Hackers adding drop shadows to their widgets, so transparent-to-black
is the most common gradient.

3. Completely solid gradients for "shaded" GUI elements.

In any case, the documentation needs a good introduction on
premultiplied alpha vs. non-premult.  Otherwise people won't have an
idea of the meaning of the color+alpha parameters they specify.

  Federico



More information about the cairo mailing list