public class ConstantColorImageAnimation extends Object implements ImageAnimation
| Modifier and Type | Class and Description |
|---|---|
static class |
ConstantColorImageAnimation.Builder
Builder object.
|
| Constructor and Description |
|---|
ConstantColorImageAnimation(ConstantColorImageAnimation.Builder builder)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static ConstantColorImageAnimation |
create(int frameWidth,
int frameHeight,
int frameDuration,
int numFrames,
Color color)
Creates new instance.
|
RenderedImage |
getFrame(int index)
Returns the frame on the the specified index.
|
int |
getFrameDuration()
Returns duration of one frame in milliseconds.
|
int |
getFrameHeight()
Returns frame height.
|
int |
getFrameWidth()
Returns frame width.
|
int |
getNumFrames()
Returns total number of frames.
|
String |
toString() |
public ConstantColorImageAnimation(ConstantColorImageAnimation.Builder builder)
builder - builder objectpublic int getFrameWidth()
ImageAnimationgetFrameWidth in interface ImageAnimationpublic int getFrameHeight()
ImageAnimationgetFrameHeight in interface ImageAnimationpublic int getNumFrames()
ImageAnimationgetNumFrames in interface ImageAnimationpublic int getFrameDuration()
ImageAnimationgetFrameDuration in interface ImageAnimationpublic RenderedImage getFrame(int index)
ImageAnimationgetFrame in interface ImageAnimationindex - index of the frame, must be in interval [0, numFrames - 1]public static ConstantColorImageAnimation create(int frameWidth, int frameHeight, int frameDuration, int numFrames, Color color)
frameWidth - frame widthframeHeight - frame heightframeDuration - duration of one framenumFrames - number of framescolor - colorCopyright © 2016. All rights reserved.