Re: drawables and refresh rates
- From: Carl Nygard <cjnygard fast net>
- To: "Andrew E. Makeev" <andrew solvo ru>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: drawables and refresh rates
- Date: Fri, 03 Dec 2004 06:33:43 -0500
On Fri, 2004-12-03 at 04:43, Andrew E. Makeev wrote:
> Rob Benton wrote:
>
> > Andrew E. Makeev wrote:
> >
> >> Before to answer you, we need to know how do you "draw" your circles?
> >> The common way is to use expose_event to redraw only those parts of
> >> the drawing area that actually were changed. In this case I never
> >> seen any flickering in my applications even on Celeron 300Mhz.
> >>
> >
> > Right now I'm using 2 methods. Method A handles the expose event of
> > the Gtk::DrawingArea which then calls method B. Method B is also
> > connected to the value changed signal of both the Gtk::HScale widgets.
> >
I do something like:
Method A handles expose events, and redraws exposed rectangle from
internal pixmap.
Method B connected to value changed signal, draws to internal pixmap,
calls queue_draw() which eventually triggers Method A.
You can add efficiency by keeping track of the bounding box of what you
redraw, and only trigger expose events for those rectangles.
Regards,
Carl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]