Animated images.
The gdk-pixbuf library provides a simple mechanism to load and represent animations. An animation is conceptually a series of frames to be displayed over time. Each frame is the same size. The animation may not be represented as a series of frames internally; for example, it may be stored as a sprite and instructions for moving the sprite around a background. To display an animation you don't need to understand its representation, however; you just ask gdk-pixbuf what should be displayed at a given point in time.
Derives from
<gdk-pixbuf-animation>
.This class defines no direct slots.
mchars
) ⇒ (ret <gdk-pixbuf-animation>
)Creates a new animation by loading it from a file. The file format is detected automatically. If the file's format does not support multi-frame images, then an animation with a single frame will be created. Possible errors are in the
<gdk-pixbuf-error>
and<g-file-error>
domains.
- filename
- Name of file to load, in the GLib file name encoding
- error
- return location for error
- ret
- A newly-created animation with a reference count of 1, or ‘
#f
’ if any of several error conditions ocurred: the file could not be opened, there was no loader for the file's format, there was not enough memory to allocate the image buffer, or the image file contained invalid data.
<gdk-pixbuf-animation>
) ⇒ (ret int
)Queries the width of the bounding box of a pixbuf animation.
- animation
- An animation.
- ret
- Width of the bounding box of the animation.
<gdk-pixbuf-animation>
) ⇒ (ret int
)Queries the height of the bounding box of a pixbuf animation.
- animation
- An animation.
- ret
- Height of the bounding box of the animation.
int
) (height int
) (rate float
) ⇒ (ret <gdk-pixbuf-simple-anim>
)Creates a new, empty animation.
- width
- the width of the animation
- height
- the height of the animation
- rate
- the speed of the animation, in frames per second
- ret
- a newly allocated
<gdk-pixbuf-simple-anim>
Since 2.8
<gdk-pixbuf-simple-anim>
) (pixbuf <gdk-pixbuf>
)Adds a new frame to animation. The pixbuf must have the dimensions specified when the animation was constructed.
- animation
- a
<gdk-pixbuf-simple-anim>
- pixbuf
- the pixbuf to add
Since 2.8