Re: how can i draw the graphic directly without expose_event??

On Sat, 13 Jul 2002, [gb2312] bdragon2001 wrote:

>    When i using the "gtk_window_process_all_updates()",the compiler shows 
> that no such defined reference,but the gdk.h has its protype.Whether
> using this function 

Perhaps you are looking for gtk_widget_queue_draw()?

> can draw the graphic directly at anywhere of the code instead of 
> associating with the expose_evnt??

You really need to do your screen draws in the expose event.

What you can do is draw to a backing pixmap and then draw the backing
pixmap in the expose event. Then you can draw to your pixmap at any time,
and then queue a draw event.

See the example scribble app from the tutorial:

Copy the configure event and expose event routines. Note how the draw
brush routine was accomplished.

>     Now i just draw the graphy in other event in which will call
> gtk_widget_draw(), but when the window change size,the configure event
> will happen and redraw drawing_area,the previouse graphic is wiped out.
> What can i do??

See above. See example.

> thanks in advance


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