Re: Pixmaps and Masks?
- From: Federico Mena Quintero <federico nuclecu unam mx>
- To: mlepage cgocable net
- CC: gnome-list gnome org
- Subject: Re: Pixmaps and Masks?
- Date: Thu, 19 Nov 1998 23:34:48 -0500
> I can copy the small pixmap to the centre of the large pixmap with this call:
>
> gdk_draw_pixmap(pLargeImage, gc, pSmallImage,
> 0, 0, // src
> 112, 112, // dest
> 32, 32);
>
>
> How can preserve the transparency in the small image? That is, in this case, how
> do I use the mask?
Set the it as a clipping mask for the gc, and set the clip origin appropriately:
gdk_gc_set_clip_mask (gc, pSmallImageMask);
gdk_gc_set_clip_origin (gc, xpos, ypos);
gdk_draw_pixmap (pLargeImage, gc, pSmallImage, 0, 0, xpos, ypos, 32, 32);
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]