GdkBitmap - turning pixels OFF



Hi,

I'm a relative newbie to the Gtk+/Gdk world and am having trouble with
the GdkBitmap.

I am creating GdkBitmaps in order to create clip masks. The mask is used
for a graphics context which I then pass as an argument to
gdk_draw_drawable. Basically I have two 'layers' which should be
exclusively independent. That is, where one 'layer' is visible (clipped
in by the mask), the other layer should be clipped out, and vice-versa.

In order to do this, and in order to update the masks as I update the
layers, I need to be able to 'turn' pixels off. I am using a Cairo
surface to write to the Bitmap. Is there a specific colour I can specify
that will be 'off' for the bitmap. I think there's some way to do this
with a GdkGC, but I can't figure it out.....

Scenario: I paint an entire 'mask' bitmap black which would clip the
entire bitmap's area. I then want to remove a small portion of the
bitmap, ie make it transparent/clear/white/off/unset again. Using Cairo
and painting an opaque white, or transparent white over the top does not
work.

Help......

Thanks. Kent.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]