[cairo] Question about cairo_paint

Antoine Azar cairo at antoineazar.com
Thu Feb 7 13:51:03 PST 2008


>Uhm... how exactly are you determining what sources are classified 
>as opaque here?

There is a _cairo_pattern_is_opaque convenience function in 
cairo-pattern.c. There is a caveat listed concerning patterns and 
gradients: * Convenience function to determine whether a pattern is 
an opaque (alpha==1.0) solid color pattern. This is done by testing 
whether the pattern's alpha value when converted to a byte is 255, so 
if a backend actually supported deep alpha channels this function 
might not do the right thing.

If I understand this correctly a "deep channel" is one that supports 
values in the whole range of a short. Which part of the code 
determines if a specified color uses the whole range of values of a 
short VS 0-255 for each channel? Knowing this would help going around 
this caveat.

>So fill() can have the exact sample problem as paint(). And 
>obviously stroke(), mask(), and show_text() can also "read" from 
>outside the surface bounds.

You're absolutely right. I'll look more into this.

Thanks for the feedback,
Antoine 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080207/8a043537/attachment-0001.htm 


More information about the cairo mailing list