[cairo] Redoing SOURCE and CLEAR

Carl Worth cworth at redhat.com
Thu Aug 18 13:37:27 PDT 2005

On Wed, 17 Aug 2005 19:44:03 -0700, Bill Spitzak wrote:
> 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.

Yes, that occurred to me as well. And I had even written that up, but
apparently it was in an earlier draft of my last message, (I've been
feeling a bit unsettled about this and I went through several drafts
before getting something out).

For what it's worth, the plan we have in cairo/TODO calls for two
alternate fill rules:


rather than an "invert path" operation.

But that's still in line with the thrust of my message that this sort
of shape-based masking of the destination is easy now if we select the
mixed-equation approach, and would only be easy in the single-equation
approach after future work were done.

> 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.

It's still quite hard to get the results though. The operations
described here clear the destination outside the path, but they use
the contents of the destination within the path. That turns out to be
quite hard to do without something like invert-path or


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050818/8b03efc6/attachment.pgp

More information about the cairo mailing list