Re: [gtk-list] Re: Getting the mask out of a pixmap
- From: Havoc Pennington <rhp zirx pair com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Getting the mask out of a pixmap
- Date: Sun, 2 May 1999 14:21:49 -0400 (EDT)
On Sun, 2 May 1999, katre wrote:
>
> Yes, i did this for XPM's, which was how I figured out how to use
> gdk_gc_set_clip_mask. However, the pixmaps I am currently using are
> GdkPixmaps that I am allocating myself and drawing on myself. There is no way
> to set the mask?
You can use a clip mask to draw, but there is no way to "get the mask out"
(there isn't a mask in there).
> I have also tried simply drawing to the bitmask at the same
> time that I draw to the pixmap, however I get the same error message. Am I
> missing a basic facet of drawing to GdkBitmaps, or is this impossible?
>
Your GC must match the depth of the drawable. i.e. you have to create a
special GC for drawing on the bitmap. You can't copy the pixmap to the
bitmap or vice versa; you can only use the bitmap as a mask.
At least, that's my guess. You might post the error message ("BadMatch"
would be the error if your GC/drawables don't ahve matching depths).
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]