Re: Pixmaps and Masks?



>  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]