Re: [gtk-list] double buffering

Basically, what I did was to create a GtkDrawingArea and a GdkPixmap, plus
any additional GdkPixmap structures you need to store frames (mine are all
in a single GdkPixmap, and I reference them according to frame). Then,    
from the "expose" event attached to your GtkDrawingArea, you 1/ clear the
GdkPixmap, 2/ draw your new frame to the GdkPixmap, and 3/ draw the
GdkPixmap directly to the GtkDrawingArea.

I have an example of this, although it's in a small application so you may
need to disregard the other code in it. The source to it is at and applet-dialer.h. While
the program isn't quite finished, the animation seems to work correctly.


On Wed, 10 Mar 1999, Travis Loyd wrote:

> could someone point me to some documentation concerning double buffering
> I'd like to animate on something of unknown size large but only actually
> need to animate on a specific area at a time... that only concerns
> displaying certain parts of a pixmap but the real question is how can I do
> it flicker free?
> I've attached (3k) some (really ugly) code which I've come up with in
> trying to figure out a flicker free method. It is doubtful I'm on the
> right track.
> Travis Loyd
> [email:				Encrypt your email too: ]
> [other:	]
> [  pgp: send email with subject: sendmepgp				]

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