[cairo] Redoing SOURCE and CLEAR

Bill Spitzak spitzak at d2.com
Wed Aug 17 19:44:03 PDT 2005


Owen Taylor wrote:

> But on the other hand:
> 
>  - The old DEST_IN is 
> 
>     "Cut this shape with scissors from the destination, 
>      and use cut out portion"

I think the useful part of this could be accomplished with the new 
version if an "invert path" operation was added. This would reverse what 
parts of the path are considered inside and outside. Then the old 
DEST_IN would be done by inverting the path and doing CLEAR instead.

I very much like the idea of using the same function for all the 
operators and having the mask/path indicate the area to change. I think 
in all cases the result is more intuitive, and all the useful other 
results can be achieved by clearing the destination and then drawing, 
even without the invert-path operator.

SATURATE does not use the same function only because it is a simulation 
of an OVER on an infinite-resoution device. Thus it is simulating the 
same function but the simulation means the math is changed.



More information about the cairo mailing list