[cairo] Subtractive Clipping Again

Travis Griggs tgriggs at cincom.com
Sat Apr 28 12:04:04 PDT 2007


I was fascinated by the discussion this last week of subtractive  
clipping. Cool stuff. So much so, that I wanted to use something like  
it for an example in my StS presentation next week.

My goal is to draw an image with a "cheese grater" effect. That is  
with holes punched in it where the background shows through. But I  
can't seem to make it work. No matter what I do, I get the opposite.  
A bunch circles showing the image.

What I have is a highlevel function that builds a clockwise rectangle  
with rounded corners and sets that as the clip. That's the "outer  
bounds". Then in my specific example routine, I path a bunch of  
circles with (newSubPath, arc_negative(2PI), close) sequences. And  
then a clip again. Is the problem that the outer bounds and all of  
these sub circles needed to part of the same path at the time I send  
clip?

I'll see if I can't try to concoct that and cross my fingers.

--
Travis Griggs
Objologist
"There are a thousand hacking at the branches of evil to one who is  
striking at the root" - Henry David Thoreau


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/cairo/attachments/20070428/7bd0ed9f/attachment.htm


More information about the cairo mailing list