[cairo] Erase a part of a draw

Owen Taylor otaylor at redhat.com
Sat May 10 11:44:31 PDT 2008

On Fri, 2008-05-09 at 10:56 +0200, fab fab wrote:
> Hello, I have a question for Cairo-Dock. I'd like to erase a portion
> of a surface after I have drawned it. For exemple a function paints a
> surface on the context, and then another function wants to make a
> "hole" in this surface, totally transparent. How could I achieve
> that ? I've tried to fill a path with all the operators, but it never
> gives me the result I want.
> Thanks for your help !

CAIRO_OPERATOR_DEST_OUT is the "punch a hole" operator. Note that the
source color should have alpha=1.0 not alpha=0.0 to get this to work.

- Owen

More information about the cairo mailing list