[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: draw signals
- From: "Dugas, Alan" <alan dugas analog com>
- To: gtk-app-devel-list gnome org,Carlos Pereira <carlos pehoe civil ist utl pt>
- Subject: RE: draw signals
- Date: Fri, 22 Dec 2000 13:08:21 -0500
Hmm... it looks like I may have to switch from a gtkplotcanvas to a
gtkdrawingarea. The reason is that the gtkplotcanvas has a "draw" and an
"expose_event" handler, which is why I was trying to filter out the "draw"
signal. Since both "draw" and "expose_event" are emitted when my pixmaps are
uncovered a redraw is being forced. I can address this problem in a
gtkdrawingarea by simply not creating a "draw" callback as you had suggested.
I'll give that a try, thanks again for your input Mark and Carlos!
-- Stupid Genius
> ----------
> From: Carlos Pereira[SMTP:carlos@pehoe.civil.ist.utl.pt]
> Sent: Friday, December 22, 2000 1:47 PM
> To: gtk-app-devel-list@gnome.org
> Subject: Re: draw signals
>
> >why have a handler redraw the pixmap if nothing has changed
> >and a simple screen update will do?
>
> In your "expose_event" callback you have full control
> over everything. You can copy a pixmap to the drawing area
> or redraw it first, if you think that is necessary. That's
> your choice!
>
> you can have something as this, in the "expose_event" call back:
>
> if (some_condition) pixmap = redraw_pixmap;
> else pixmap = get_old_pixmap;
>
> copy_pixmap_to_drawing_area (pixmap);
>
> If some_condition is too difficult to be handled
> automatically (and often is), then just forget
> and redraw always.
>
> Carlos
>
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]