Re: expose event & pixmap question

From: Christian Seberino <seberino spawar navy mil>
> Paul
> It is slowly becoming clearer thanks to you. We can draw
> on a pixmap which is associated with a window which
> is part of a drawing area.
> Configure/Expose events that *just* modify pixmaps work
> great.  I assume at the end of one of those callbacks
> that some hidden routine says, "OK, now we need
> to DISPLAY this pixmap on the window" and does it???
> The reason I am asking is that I made one of these callbacks
> be called at other times when a configure/expose event
> was NOT fired -- with gtk_idle_add.  Drawing on a pixmap
> does NOT automagically change what is seen on GUI right???
> How can I make these changes appear then (outside of a
> configure/expose event)??

Connect to the configure event of the widget, and in the event
handler do gdk_draw_pixmap() (gdk_draw_drawable() in 2.0) to
blit the pixmap to the window. That's what the expose event is for.

Ron Steinke

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