[cairo] Cairo gradients and pre-mul data

Keith Packard keithp at keithp.com
Tue Jun 20 19:28:53 PDT 2006


On Wed, 2006-06-21 at 01:53 +0000, jose_ogp at juno.com wrote:

> 	I can't really suggest to you a 'better' api that would take 
> into account having premul color stops then what you already thought, 
> only point out that a non-premul only interface and implementation 
> is limiting as well.. And if you think enough about what's actually 
> 'behind' gradients -- one-dimensional texture data -- then, having 
> non-premul semantics there but premul semantics for the two-dim 
> case.. seems like a somewhat arbitrary inconsistency from that 
> perspective. 

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.

Pragmatics overrode the strict adherance to a premultiplied API.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060620/02e91469/attachment-0001.pgp


More information about the cairo mailing list