[cairo] Cairo gradients and pre-mul data

jose_ogp at juno.com jose_ogp at juno.com
Tue Jun 20 14:58:31 PDT 2006


 
	I wonder if anyone here can comment on a particular aspect 
of Cairo's handling of "gradients". 
 
	While Cairo seems to be faithfully committed to using 
alpha-pre-multiplied color data when transforming and compositing 
'surfaces', it seems that when generating the 'spectrum' of a 
gradient it assumes non pre-mul color data, does its linear 
interpolation with such, and only then pre-muls the results. 
 
	While it's true that one can't obtain the same results if 
one were to pre-mul the input color data (or require them pre-mul) 
and do the linear interpolation with such, that alone is insufficient 
reason for not doing so. I would suspect that the current semantics, 
differing from the rest of Cairo, would be unwise... 
 
	What is the actual overriding reason that decided Cairo 
on using its current approach for gradients? 
 



More information about the cairo mailing list