Re: drawables and refresh rates



Rob Benton wrote:

Jan Hudec wrote:

On Wed, Dec 01, 2004 at 11:14:58 -0600, Rob Benton wrote:

I have a Gdk::Drawable where I'm drawing 2 arcs. A blue circle and a red arc drawn on top of the blue circle. I've got 2 Gtk::HScale widgets using a DISCONTINUOUS_UPDATE that modify the angle and width of the red arc. On update the the blue circle is redrawn and then the red is redrawn on top of it using the values from the scale widgets. This causes some flickering on the drawing area. Is there a better way to do this?



Computer graphics 101. Double buffering.

-------------------------------------------------------------------------------
                         Jan 'Bulb' Hudec <bulb ucw cz>



Well I'm a mediocre pencil & paper artist but I'm a total noob at computer graphics. Do you guys know of any resources I could use to get started?

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.

Regards,
-andrew




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]