|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.cast.CompositedMultiFrameImage
public class CompositedMultiFrameImage
Used to composite the action frames for a particular orientation of a
CompositedActionFrames.
| Nested Class Summary | |
|---|---|
protected class |
CompositedMultiFrameImage.CompositedVolatileMirage
Used to create our mirage using the source action frame images. |
protected class |
CompositedMultiFrameImage.SubmirageForwarder
A CompositedMirage that forwards all of its Mirage calls to a delegate Mirage. |
| Field Summary | |
|---|---|
protected String |
_action
The action we're compositing. |
protected CompositedMirage[] |
_images
Our composited action frame images. |
protected ImageManager |
_imgr
The image manager from whom we load our images. |
protected int |
_orient
The orientation we're compositing. |
protected CompositedActionFrames.ComponentFrames[] |
_sources
The action frames from which we obtain our source imagery. |
| Constructor Summary | |
|---|---|
CompositedMultiFrameImage(ImageManager imgr,
CompositedActionFrames.ComponentFrames[] sources,
String action,
int orient)
|
|
| Method Summary | |
|---|---|
protected CompositedMirage |
createCompositedMirage(int index)
Creates a composited image for the specified frame. |
long |
getEstimatedMemoryUsage()
Returns the estimated memory usage of our composited frame images. |
protected Mirage |
getFrame(int orient,
int index)
|
int |
getFrameCount()
Returns the number of frames in this multi-frame image. |
int |
getHeight(int index)
Returns the height of the specified frame image. |
void |
getTrimmedBounds(int index,
Rectangle bounds)
Fills in the minimum bounding rectangle for this image that contains all non-transparent pixels. |
int |
getWidth(int index)
Returns the width of the specified frame image. |
int |
getXOrigin(int index)
|
int |
getYOrigin(int index)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ImageManager _imgr
protected CompositedActionFrames.ComponentFrames[] _sources
protected String _action
protected int _orient
protected CompositedMirage[] _images
| Constructor Detail |
|---|
public CompositedMultiFrameImage(ImageManager imgr,
CompositedActionFrames.ComponentFrames[] sources,
String action,
int orient)
| Method Detail |
|---|
public int getFrameCount()
MultiFrameImage
getFrameCount in interface MultiFrameImagepublic int getWidth(int index)
MultiFrameImage
getWidth in interface MultiFrameImagepublic int getHeight(int index)
MultiFrameImage
getHeight in interface MultiFrameImagepublic int getXOrigin(int index)
public int getYOrigin(int index)
public void paintFrame(Graphics2D g,
int index,
int x,
int y)
MultiFrameImage
paintFrame in interface MultiFrameImage
public boolean hitTest(int index,
int x,
int y)
MultiFrameImage
hitTest in interface MultiFrameImage
public void getTrimmedBounds(int index,
Rectangle bounds)
TrimmedMultiFrameImage
getTrimmedBounds in interface TrimmedMultiFrameImagepublic long getEstimatedMemoryUsage()
protected CompositedMirage createCompositedMirage(int index)
protected Mirage getFrame(int orient,
int index)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||