Re: expose event & pixmap question
- From: Havoc Pennington <hp redhat com>
- To: Christian Seberino <seberino spawar navy mil>
- Cc: gtk-list gnome org
- Subject: Re: expose event & pixmap question
- Date: 28 Feb 2002 11:34:29 -0500
Christian Seberino <seberino spawar navy mil> writes:
> gint exposeEventHandler(GtkWidget* widget, GdkEventExpose* event) {
> gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
> Pixmaps::myPicture, event->area.x, event->area.y,
> event->area.x, event->area.y, event->area.width, event->area.height);
>
> return FALSE;
> };
>
>
> Pixmaps make expose event handlers easy I think because you can just
> redraw uncovered portion with a single function call as in function above.
>
> WHY CAN'T WE REDRAW A PORTION OF THE DRAWING AREA THE SAME
> WAY AND AVOID NEED FOR PIXMAP?
Because the user will see each individual drawing operation, causing
flicker. Try it.
This is what GTK 2 fixes - it automatically double buffers, so you can
redraw directly to the drawing area and do not need the pixmap.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]