public class SingleFrameImageImpl extends Object implements MultiFrameImage
MultiFrameImage interface intended to facilitate the creation of MFIs
whose display frames consist of only a single image.| Constructor and Description |
|---|
SingleFrameImageImpl(Mirage mirage)
Constructs a single frame image object.
|
| 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 SingleFrameImageImpl(Mirage mirage)
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.