[cairo] Alpha masks

Bill Spitzak spitzak at d2.com
Thu Jan 6 18:00:44 PST 2005


On Thursday 06 January 2005 01:38 pm, Keith Packard wrote:
> That is to simply treat the 'clip' as another part of the 'mask' and
> accept the fact that areas beyond the clip will be modified in the
> destination.  All of the operations remain well defined, although their
> utility may be strongly compromised in some cases.  Do an 'IN' operation
> with an empty clip and the entire destination surface will be erased.
>
> We can take advantage of our existing rectangle-set clip computations to
> make the 'outside' parts more efficiently modified; applying (0,0,0,0)
> to the inverse of the rectangle-set clip area.
>
> Is the ease of specification and consistency in the API worth the
> degredation of expected functionality?  Does anyone have an alternative
> specification which works for the full range of alpha values?

I have proposed before the actual elimination of all compositing operations 
that are able to modify where alpha is zero. This restricts the functionality 
even more than you are proposing, but I feel it is well worth it for 
simplifying the situation.

This does require an "invert the path" operator that makes fill-path draw 
*outside* rather than inside (ie the area inside the clip that is not inside 
the path). With this addition you can simulate all the existing operators by 
drawing both the inside and outside with different operators.

-- 
                   ,~,~,~,~ ~ ~ ~ ~
     /\_       _|_========___         Bill Spitzak
 ~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com




More information about the cairo mailing list