[cairo] darken everything except ..
spammanibara at gmail.com
Thu May 1 12:33:17 PDT 2008
Hi Cairo developers, and thank you for a very good and easy-to-use library.
I have a bunch of polygons that the user can click on. Now I want to
"disable" some of them, and I want to indicate this by making them darker.
The easiest way seems to be to draw a dark semi-transparent gray rectangle
over everything else, and mask out the enabled polygons. But I cant figure
out how to do the masking (how to cut holes in the rectangle). It seems I
cant use a pattern for masking here, so that leaves me with having to create
a new surface the size of the original surface, and use that as the mask. I
havent tried this, but wouldnt it waste a lot of memory? I'm uncomfortable
with duplicating everything, but then again I dont really know what a
surface is inside of Cairo, so maybe I'm imagining problems here.
Can you help me? How would you solve my problem?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo