Re: drawing graphics
- From: Olexiy Avramchenko <ath beast stu cn ua>
- To: Ian Britten <britten caris com>
- Cc: gtk-list gnome org, Olexiy Avramchenko <ath beast stu cn ua>
- Subject: Re: drawing graphics
- Date: Thu, 19 Sep 2002 17:51:56 +0300
Ian Britten wrote:
In addition to using a background pixmap (as suggested), I also 'attach'
the pixmap to the window (using gdk_window_set_back_pixmap()).
This way, you never have to deal with expose events (unless you are
drawing stuff that isn't in your background pixmap).
All in all, this give a very fast and pleasing application. No flicker,
no waiting for expose events to be processed, the data is always visible
(Even when stepping through the debugger! :-) etc, etc.
(As you've discovered, trying to draw all your data within every expose
event is really inefficient, and grinds your app to a standstill if you
have much data to draw....)
We almost forget to say about gtk_widget_set_double_buffered() in gtk+-2.0.
In this case you have to turn off gtk double buffering stuff, cause its
not needed:
gtk_widget_set_double_buffered(widget, FALSE);
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]