|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dishevelled.piccolo.sprite.Animations
public final class Animations
Static utility methods for creating animations.
| Method Summary | |
|---|---|
static MultipleFramesAnimation |
createAnimation(BufferedImage spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return a new multiple frames animation containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static SingleFrameAnimation |
createAnimation(File image)
Create and return a new single frame animation from the specified image file. |
static MultipleFramesAnimation |
createAnimation(File spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return a new multiple frames animation containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static MultipleFramesAnimation |
createAnimation(File baseImage,
String suffix,
int frames)
Create and return a new multiple frames animation containing all the frame images specified from baseImage. |
static SingleFrameAnimation |
createAnimation(Image image)
Create and return a new single frame animation from the specified image. |
static SingleFrameAnimation |
createAnimation(InputStream image)
Create and return a new single frame animation from the specified image input stream. |
static MultipleFramesAnimation |
createAnimation(InputStream spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return a new multiple frames animation containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static MultipleFramesAnimation |
createAnimation(List<Image> images)
Create and return a new multiple frames animation containing the specified frame images. |
static MultipleFramesAnimation |
createAnimation(String baseImage,
String suffix,
int frames)
Create and return a new multiple frames animation containing all the frame images specified from baseImage. |
static SingleFrameAnimation |
createAnimation(URL image)
Create and return a new single frame animation from the specified image URL. |
static MultipleFramesAnimation |
createAnimation(URL spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return a new multiple frames animation containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static MultipleFramesAnimation |
createAnimation(URL baseImage,
String suffix,
int frames)
Create and return a new multiple frames animation containing all the frame images specified from baseImage. |
static List<Image> |
createFrameList(BufferedImage spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return an unmodifiable list of frame images containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static List<Image> |
createFrameList(File spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return an unmodifiable list of frame images containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static List<Image> |
createFrameList(File baseImage,
String suffix,
int frames)
Create and return an unmodifiable list of images containing all the frame images specified from baseImage. |
static List<Image> |
createFrameList(InputStream spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return an unmodifiable list of frame images containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static List<Image> |
createFrameList(String baseImage,
String suffix,
int frames)
Create and return an unmodifiable list of images containing all the frame images specified from baseImage. |
static List<Image> |
createFrameList(URL spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return an unmodifiable list of frame images containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static List<Image> |
createFrameList(URL baseImage,
String suffix,
int frames)
Create and return an unmodifiable list of images containing all the frame images specified from baseImage. |
static LoopedFramesAnimation |
createLoopedAnimation(BufferedImage spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return a new looped frames animation containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static LoopedFramesAnimation |
createLoopedAnimation(File spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return a new looped frames animation containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static LoopedFramesAnimation |
createLoopedAnimation(File baseImage,
String suffix,
int frames)
Create and return a new looped frames animation containing all the frame images specified from baseImage. |
static LoopedFramesAnimation |
createLoopedAnimation(InputStream spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return a new looped frames animation containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static LoopedFramesAnimation |
createLoopedAnimation(List<Image> images)
Create and return a new looped frames animation containing the specified frame images. |
static LoopedFramesAnimation |
createLoopedAnimation(String baseImage,
String suffix,
int frames)
Create and return a new looped frames animation containing all the frame images specified from baseImage. |
static LoopedFramesAnimation |
createLoopedAnimation(URL spriteSheet,
int x,
int y,
int width,
int height,
int frames)
Create and return a new looped frames animation containing all the frame images from spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames. |
static LoopedFramesAnimation |
createLoopedAnimation(URL baseImage,
String suffix,
int frames)
Create and return a new looped frames animation containing all the frame images specified from baseImage. |
static BufferedImage |
createSpriteSheet(File baseImage,
String suffix,
int frames)
Create and return a new sprite sheet image containing all of the specified frame images specified from baseImage assembled horizontally. |
static BufferedImage |
createSpriteSheet(List<Image> frameImages)
Create and return a new sprite sheet image containing all of the specified frame images assembled horizontally. |
static BufferedImage |
createSpriteSheet(String baseImage,
String suffix,
int frames)
Create and return a new sprite sheet image containing all of the specified frame images specified from baseImage assembled horizontally. |
static BufferedImage |
createSpriteSheet(URL baseImage,
String suffix,
int frames)
Create and return a new sprite sheet image containing all of the specified frame images specified from baseImage assembled horizontally. |
static List<Image> |
flipHorizontally(List<Image> frameImages)
Create and return an unmodifiable list of frame images containing all the frame images from frameImages in the same order flipped horizontally. |
static List<Image> |
flipVertically(List<Image> frameImages)
Create and return an unmodifiable list of frame images containing all the frame images from frameImages in the same order flipped vertically. |
static List<Image> |
rotate(BufferedImage image,
int steps)
Create and return an unmodifiable list of frame images created by rotating around the center of specified image 2π/steps times. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SingleFrameAnimation createAnimation(InputStream image)
throws IOException
image - image input stream
IOException - if an IO error occurs
public static SingleFrameAnimation createAnimation(File image)
throws IOException
image - image file
IOException - if an IO error occurs
public static SingleFrameAnimation createAnimation(URL image)
throws IOException
image - image URL
IOException - if an IO error occurspublic static SingleFrameAnimation createAnimation(Image image)
image - image
public static MultipleFramesAnimation createAnimation(String baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image file or URL namesuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static MultipleFramesAnimation createAnimation(File baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image filesuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static MultipleFramesAnimation createAnimation(URL baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image URLsuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static LoopedFramesAnimation createLoopedAnimation(String baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image file or URL namesuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static LoopedFramesAnimation createLoopedAnimation(File baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image filesuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static LoopedFramesAnimation createLoopedAnimation(URL baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image URLsuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static MultipleFramesAnimation createAnimation(InputStream spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet input streamx - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static MultipleFramesAnimation createAnimation(File spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet filex - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static MultipleFramesAnimation createAnimation(URL spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet URLx - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static MultipleFramesAnimation createAnimation(BufferedImage spriteSheet,
int x,
int y,
int width,
int height,
int frames)
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet imagex - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
public static LoopedFramesAnimation createLoopedAnimation(InputStream spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet input streamx - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static LoopedFramesAnimation createLoopedAnimation(File spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet filex - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static LoopedFramesAnimation createLoopedAnimation(URL spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet URLx - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static LoopedFramesAnimation createLoopedAnimation(BufferedImage spriteSheet,
int x,
int y,
int width,
int height,
int frames)
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet imagex - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of framespublic static MultipleFramesAnimation createAnimation(List<Image> images)
images - list of frame images, must not be null
public static LoopedFramesAnimation createLoopedAnimation(List<Image> images)
images - list of frame images, must not be null
public static List<Image> createFrameList(String baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image file or URL namesuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static List<Image> createFrameList(File baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image filesuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static List<Image> createFrameList(URL baseImage,
String suffix,
int frames)
throws IOException
baseImage.
baseImage - base image URLsuffix - image suffixframes - number of frames
baseImage
IOException - if an IO error occurs
public static List<Image> createFrameList(InputStream spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet input streamx - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static List<Image> createFrameList(File spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet filex - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static List<Image> createFrameList(URL spriteSheet,
int x,
int y,
int width,
int height,
int frames)
throws IOException
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet filex - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames
IOException - if an IO error occurs
public static List<Image> createFrameList(BufferedImage spriteSheet,
int x,
int y,
int width,
int height,
int frames)
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of frames.
spriteSheet - sprite sheet imagex - starting location xy - starting location ywidth - frame widthheight - frame heightframes - number of frames
spriteSheet as specified by the starting location (x, y)
and read horizontally the specified number of framespublic static BufferedImage createSpriteSheet(List<Image> frameImages)
frameImages - frame images, must not be null
public static BufferedImage createSpriteSheet(String baseImage,
String suffix,
int frames)
throws IOException
baseImage assembled horizontally.
baseImage - base image file or URL namesuffix - image suffixframes - number of frames
baseImage assembled horizontally
IOException - if an IO error occurs
public static BufferedImage createSpriteSheet(File baseImage,
String suffix,
int frames)
throws IOException
baseImage assembled horizontally.
baseImage - base image filesuffix - image suffixframes - number of frames
baseImage assembled horizontally
IOException - if an IO error occurs
public static BufferedImage createSpriteSheet(URL baseImage,
String suffix,
int frames)
throws IOException
baseImage assembled horizontally.
baseImage - base image URLsuffix - image suffixframes - number of frames
baseImage assembled horizontally
IOException - if an IO error occurspublic static List<Image> flipHorizontally(List<Image> frameImages)
frameImages in the same order flipped horizontally.
frameImages - list of frame images, must not be null
frameImages in the same order flipped horizontallypublic static List<Image> flipVertically(List<Image> frameImages)
frameImages in the same order flipped vertically.
frameImages - list of frame images, must not be null
frameImages in the same order flipped vertically
public static List<Image> rotate(BufferedImage image,
int steps)
image - image to rotate, must not be nullsteps - number of steps
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||