public class TileMultiFrameImage extends Object implements MultiFrameImage
MultiFrameImage implementation that obtains its image frames
from a tileset.| Constructor and Description |
|---|
TileMultiFrameImage(TileSet source)
Creates a tile MFI which will obtain its image frames from the
specified source tileset.
|
TileMultiFrameImage(TileSet source,
Colorization[] zations)
Creates a recoolored tile MFI which will obtain its image frames
from the specified source tileset.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getFrameCount()
Returns the number of frames in this multi-frame image.
|
int |
getHeight(int index)
Returns the height of the specified frame image.
|
int |
getWidth(int index)
Returns the width of the specified frame image.
|
boolean |
hitTest(int index,
int x,
int y)
Returns true if the specified frame contains a non-transparent
pixel at the specified coordinates.
|
void |
paintFrame(Graphics2D g,
int index,
int x,
int y)
Renders the specified frame into the specified graphics object at
the specified coordinates.
|
public TileMultiFrameImage(TileSet source)
public TileMultiFrameImage(TileSet source, Colorization[] zations)
public int getFrameCount()
MultiFrameImagegetFrameCount in interface MultiFrameImagepublic int getWidth(int index)
MultiFrameImagegetWidth in interface MultiFrameImagepublic int getHeight(int index)
MultiFrameImagegetHeight in interface MultiFrameImagepublic void paintFrame(Graphics2D g, int index, int x, int y)
MultiFrameImagepaintFrame in interface MultiFrameImagepublic boolean hitTest(int index,
int x,
int y)
MultiFrameImagehitTest in interface MultiFrameImageCopyright © 2015. All rights reserved.