Re: gtk_drawing_area_size flicker question
- From: Havoc Pennington <hp redhat com>
- To: David Raufeisen <david fortyoz org>
- Cc: gtk-list gnome org
- Subject: Re: gtk_drawing_area_size flicker question
- Date: 17 Sep 2001 13:30:52 -0400
David Raufeisen <david fortyoz org> writes:
>
> My app loads around 30 pixmaps (232x18), draws them one after
> another in a GtkDrawingArea .. so its height is numpixmaps * 18, if
> more need to be added or removed then its resized again to
> numpixmaps * 18, i'm seeing flicker during the resize .. looks like
> different blocks of the pixmaps flicker and is quite annoying,
> someone mentioned using double buffering so I only add one pixmap to
> the drawing area, would this stop flicker? is it sensible to destroy
> and recreate s pixmap this large (and draw my 30 or so pixmaps)
> every time something changes? ( a few times per minute ).
>
> 30 is just an arbitrary number, the number of pixmaps can really be any amount.
>
> Ideas?
>
Use a backing store for the drawing area, as described in the
"scribble" example in the tutorial. i.e. draw all pixmaps to one
pixmap that's the size of the drawing area, then draw the big pixmap
to the drawing area at the end.
This Just Works in GTK 2 where double buffering is done for you, but
in 1.2 it has to be done manually.
It should be fine to create the big pixmap every time something
changes, sure.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]