Re: expose event & pixmap question



Hi,

Christian Seberino <seberino spawar navy mil> writes:

> 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)??

you should do all drawing in the expose_event handler. If
you want the displayed image to change you can force a redraw
by calling gtk_widget_queue_redraw(). This will cause the
emission of an expose_event for the whole drawing area as
soon as the main loop becomes idle. Your expose_handler is
called and you can redraw the image.


Salut, Sven



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