|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.AbstractMedia
com.threerings.media.animation.Animation
com.threerings.media.animation.MultiFrameAnimation
public class MultiFrameAnimation
Animates a sequence of image frames in place with a particular frame rate.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.media.animation.Animation |
|---|
Animation.AnimCompletedOp, Animation.AnimStartedOp |
| Field Summary | |
|---|---|
protected int |
_fidx
|
protected MultiFrameImage |
_frames
|
protected FrameSequencer |
_seeker
|
| Fields inherited from class com.threerings.media.animation.Animation |
|---|
_finished |
| Fields inherited from class com.threerings.media.AbstractMedia |
|---|
_bounds, _firstTick, _mgr, _observers, _renderOrder, HUD_LAYER |
| Constructor Summary | |
|---|---|
MultiFrameAnimation(MultiFrameImage frames,
double fps,
boolean loop)
Creates a multi-frame animation with the specified source image frames and the specified target frame rate (in frames per second). |
|
MultiFrameAnimation(MultiFrameImage frames,
FrameSequencer seeker)
Creates a multi-frame animation with the specified source image frames and the specified target frame rate (in frames per second). |
|
| Method Summary | |
|---|---|
void |
fastForward(long timeDelta)
Called when the appropriate media manager has been paused for some length of time and is then unpaused. |
Rectangle |
getBounds()
Returns a rectangle containing all the pixels rendered by this media. |
void |
paint(Graphics2D gfx)
Called by the appropriate manager to request that the media render itself with the given graphics context. |
void |
reset()
If this animation has run to completion, it can be reset to prepare it for another go. |
protected void |
setFrameIndex(int fidx)
Sets the frame index and updates our dimensions. |
void |
tick(long tickStamp)
Called periodically by this media's manager to give it a chance to do its thing. |
| Methods inherited from class com.threerings.media.animation.Animation |
|---|
addAnimationObserver, didFinish, isFinished, removeAnimationObserver, setLocation, willFinish, willStart |
| Methods inherited from class com.threerings.media.AbstractMedia |
|---|
addObserver, contains, contains, contains, contains, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, init, intersects, intersects, invalidate, invalidateAfterChange, naturalCompareTo, queueNotification, removeObserver, renderCompareTo, setRenderOrder, shutdown, toString, toString, viewLocationDidChange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected MultiFrameImage _frames
protected FrameSequencer _seeker
protected int _fidx
| Constructor Detail |
|---|
public MultiFrameAnimation(MultiFrameImage frames,
double fps,
boolean loop)
frames - the source frames of the animation.fps - the target number of frames per second.loop - whether the animation should loop indefinitely or
finish after one shot.
public MultiFrameAnimation(MultiFrameImage frames,
FrameSequencer seeker)
| Method Detail |
|---|
public Rectangle getBounds()
AbstractMedia
getBounds in interface ShapegetBounds in class AbstractMediapublic void reset()
Animation
reset in class Animationpublic void tick(long tickStamp)
AbstractMedia
tick in class AbstractMediatickStamp - a time stamp associated with this tick. Note: this is not obtained
from a call to System.currentTimeMillis() and cannot be compared to timestamps
obtained there from.protected void setFrameIndex(int fidx)
public void paint(Graphics2D gfx)
AbstractMedia
paint in class AbstractMediapublic void fastForward(long timeDelta)
AbstractMedia
fastForward in class AbstractMedia
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||