Re: gtk_drawing_area_size flicker question



Hi,

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 ).

I'd suggest using an offscreen pixmap. This will remove flicker and you can
save resizes by allocating a larger pixmap and only drawing the relevant part
into your drawing area. E.g. start with a pixmap large enough to hold 30
images and increase the size by 10 as soon as the 31th image needs to be 
added. Of course this will only work if you are only adding to and removing
from the start/end of the list of images.


Salut, Sven




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