Re: expose-event
- From: "richard boaz" <riboaz xs4all nl>
- To: gtk-list gnome org
- Subject: Re: expose-event
- Date: Wed, 22 Jun 2005 10:58:57 +0200
hmm, not sure if i'm getting the wrong end of the stick, here, but in my
drawing program i adhere 100% to the following algorithm:
configure_event - responsible for all drawing code, drawing only to an
internal pixmap buffer.
expose_event - responsible for rendering the pixmap drawn in the configure
event to the drawing area itself, i.e, the screen.
for my application, the pixmap i draw to is determined by several program
settings/factors: it is possible for me to be maintaining more than one
internal pixmap at a time for a certain drawing area, while only one of
these pixmaps is ever rendered to the screen at any given moment.
the configure event, then, determines which internal pixmap i should draw,
makes this internal pixmap, and then sets the variable defining the actual
pixmap to render to the screen. it is the configure event that is called
first upon a resize with the expose event following.
the expose event, then, simply renders the pixmap held in this variable to
the screen.
N.B. i would not recommend managing drawing areas by using only the expose
event to render the screen, this is incredibly inefficient since there are
expose events which do not require redrawing the entire drawing area.
cheers,
richard
On Wed, 22 Jun 2005 10:37:27 +0200, Sven Neumann <sven gimp org> wrote:
Hi,
abent gmx de writes:
resize my window. i wanna redraw a drawingarea after i resize
the window. but in this case my drawing-function do her work,
and after that the expose-event delete it.
You must not do any drawing outside the expose event callback.
Sven
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list
--
Richard Boaz
riboaz xs4all nl
+31.(0)648.792.484
http://www.boazconsultancy.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]