Re: How to draw a GdkPixmap with mask onto a drawing area?



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.

I like the second idea, but will it work for my situation?

I have one BIG GtkDrawingArea inside a scrolled window.

I need to draw (about four) GtkPixmaps, several dozen times in it.
Kind of like how the GtkCList works with type PixText cells.

So would creating a GtkPixmap do the trick? If so how do I draw a
GtkPixmap (that is masked) to my BIG GtkDrawingArea?


--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
..__                         ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/





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