Re: How to draw a GdkPixmap with mask onto a drawing area?
- From: Darin Adler <darin eazel com>
- To: <learfox furry ao net>, GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: Re: How to draw a GdkPixmap with mask onto a drawing area?
- Date: Fri, 26 Jan 2001 16:19:48 -0800
on 1/26/01 4:10 PM, learfox furry ao net at learfox furry ao net wrote:
I have a GdkPixmap and a GdkBitmap, the pair are a pixmap and mask.
I want to use GDK drawing functions to draw the pixmap onto a GtkDrawing
area but I want to take into account the mask.
Do I need to test the mask each pixel at a time and copy each pixel one by
one? Or is there a more convient way? (without using shaped windows)
You need to use gdk_gc_set_clip_mask in conjunction with gdk_draw_pixmap.
Look at the gtk_pixmap_expose function in gtkpixmap.c for a working example
that also demonstrates restoring the clip mask and setting the clip origin
(but you will probably want to ignore the "insensitive" part).
Also, you might just find you can use a GtkPixmap widget instead of doing
the drawing yourself. That often happens for me.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]