Re: Animated interface question



On Wed, Jun 07, 2006 at 06:50:32PM +1000, kadil wrote:
I wrote an application that displayed multiple animated sequences and
moved them around the screen to represent machine activities. I bit like
a 2d game

The way that I did it was to create arrays (yes I know I should have
used linked lists)

why?

                   of structures that wrapped up each frame of the
animated sequence and a pointer to the next frame in the sequence. I
then used a gtk timer [...]
Is there a way to load and display an animated gif or png file [...]

Caveat: not tested it myself, but gdk has an GdkPixbufAnimation class to
represent animations. And a GtkImage accepts an animation as image (e.g.
with gtk_image_new_from_animation or thereabouts). Worth a try.

HTH
-- tomás


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