|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.Filmstrip
public class Filmstrip
A Filmstrip is just a sequence of images. It is possible for some of the images in the Filmstrip to be null. The images are numbered starting at zero. There is no preset limit on the number of images.
Constructor Summary | |
---|---|
Filmstrip()
|
Method Summary | |
---|---|
java.awt.image.BufferedImage |
getFrame(int frameNumber)
Returns the image at at a specified position in the filmstrip. |
int |
getFrameCount()
Returns the current number of frames in the filmstrip. |
static int |
maxFrames(int width,
int height,
boolean color)
Attempts to determine how many filmstrip frames an still be created with a specified size. |
void |
setFrame(int frameNumber,
java.awt.image.BufferedImage image)
Sets a specified frame in the filmstrip to a given image. |
void |
stripNullFrames()
Removes any frames for which the image is null from the filmstrip. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Filmstrip()
Method Detail |
---|
public static int maxFrames(int width, int height, boolean color)
width
- the width in pixels of the imagesheight
- the height in pixels of the imagescolor
- are the images to be colored (4 bytes per pixel) or black and white (1 byte per pixel)?Util.availableMemory()
public void setFrame(int frameNumber, java.awt.image.BufferedImage image)
frameNumber
- The position in the filmstrip where the image is to be added.
An error occurs if this is less than zero.image
- The image that is to be put at postion frameNumber in the filmstrip.
This can be null.public int getFrameCount()
public java.awt.image.BufferedImage getFrame(int frameNumber)
frameNumber
- The number of the frame that is to be returned. An error occurs
if this is not greater than or equal to zero and less than getFrameCount()
.public void stripNullFrames()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |