|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Boxed
org.gnu.gdk.PixbufAnimation
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 this class what should be displayed at a given point in time.
Field Summary |
Fields inherited from class org.gnu.glib.Boxed |
handle |
Constructor Summary | |
PixbufAnimation(Handle handle)
Create a new pixbuf from a handle to a native resource. |
|
PixbufAnimation(java.lang.String filename)
Construct a new Pixbuf animation by loading it from a file. |
Method Summary | |
protected static int |
gdk_pixbuf_animation_get_height(Handle animation)
|
protected static Handle |
gdk_pixbuf_animation_get_iter(Handle animation,
long sec,
long usec)
|
protected static Handle |
gdk_pixbuf_animation_get_static_image(Handle animation)
|
protected static int |
gdk_pixbuf_animation_get_type()
|
protected static int |
gdk_pixbuf_animation_get_width(Handle animation)
|
protected static boolean |
gdk_pixbuf_animation_is_static_image(Handle animation)
|
protected static Handle |
gdk_pixbuf_animation_new_from_file(java.lang.String filename,
Handle error)
|
PixbufAnimationIter |
getIter(long startSec,
long startUsec)
Get an iterator for displaying an animation. |
Pixbuf |
getStaticImage()
If an animation is really just a plain image (has only one frame), this method returns that image. |
int |
height()
Return the height of the bounding box of a pixbuf animation. |
boolean |
isStaticImage()
If this animation was loaded from a that turns out to be a plain unaminated image then this method will return true. |
int |
width()
Return the width of the bounding box of a pixbuf animation. |
Methods inherited from class org.gnu.glib.Boxed |
equals, getHandle, hashCode, setHandle |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PixbufAnimation(java.lang.String filename) throws JGException
filename
- The name of the image file.public PixbufAnimation(Handle handle)
handle
- The handle to the native resoufceMethod Detail |
public int width()
public int height()
public PixbufAnimationIter getIter(long startSec, long startUsec)
The start time marks the beginning of animation playback. After creating an iterator, you should immediately display the pixbuf returned by the getPixbuf() method of PixbufAnimationIter. Then, you should install a timeout by some mechanism to ensure that you'll update the image after the delay time. Each time the image is updated, you should reinstall the timeout with the new, possibly-changed delay time.
startSec
- startUsec
- public boolean isStaticImage()
public Pixbuf getStaticImage()
protected static final int gdk_pixbuf_animation_get_type()
protected static final Handle gdk_pixbuf_animation_new_from_file(java.lang.String filename, Handle error)
protected static final int gdk_pixbuf_animation_get_width(Handle animation)
protected static final int gdk_pixbuf_animation_get_height(Handle animation)
protected static final Handle gdk_pixbuf_animation_get_iter(Handle animation, long sec, long usec)
protected static final boolean gdk_pixbuf_animation_is_static_image(Handle animation)
protected static final Handle gdk_pixbuf_animation_get_static_image(Handle animation)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |