public class CompositedActionFrames extends Object implements ActionFrames, DirectionCodes
MultiFrameImage interface that is used
to lazily create composited character frames when they are requested.| Modifier and Type | Class and Description |
|---|---|
static class |
CompositedActionFrames.ComponentFrames
Used to associate a
CharacterComponent with its ActionFrames for a particular action. |
CARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWEST| Constructor and Description |
|---|
CompositedActionFrames(ImageManager imgr,
Map<com.threerings.cast.CompositedActionFrames.CompositedFramesKey,CompositedMultiFrameImage> frameCache,
String action,
CompositedActionFrames.ComponentFrames[] sources)
Constructs a set of composited action frames with the supplied
source frames and colorization configuration.
|
| Modifier and Type | Method and Description |
|---|---|
ActionFrames |
cloneColorized(Colorization[] zations)
Creates a clone of these action frames which will have the supplied colorizations applied
to the frame images.
|
ActionFrames |
cloneTranslated(int dx,
int dy)
Creates a clone of these action frames which will have the supplied translation applied to
the frame images.
|
TrimmedMultiFrameImage |
getFrames(int orient)
Returns the multi-frame image that comprises the frames for the specified orientation.
|
int |
getOrientationCount()
Returns the number of orientations available in this set of action frames.
|
int |
getXOrigin(int orient,
int frameIdx)
Returns the x offset from the upper left of the image to the "origin" for this character
frame.
|
int |
getYOrigin(int orient,
int frameIdx)
Returns the y offset from the upper left of the image to the "origin" for this character
frame.
|
public CompositedActionFrames(ImageManager imgr, Map<com.threerings.cast.CompositedActionFrames.CompositedFramesKey,CompositedMultiFrameImage> frameCache, String action, CompositedActionFrames.ComponentFrames[] sources)
public int getOrientationCount()
ActionFramesgetOrientationCount in interface ActionFramespublic TrimmedMultiFrameImage getFrames(int orient)
ActionFramesgetFrames in interface ActionFramespublic int getXOrigin(int orient,
int frameIdx)
ActionFramesgetXOrigin in interface ActionFramespublic int getYOrigin(int orient,
int frameIdx)
ActionFramesgetYOrigin in interface ActionFramespublic ActionFrames cloneColorized(Colorization[] zations)
ActionFramescloneColorized in interface ActionFramespublic ActionFrames cloneTranslated(int dx, int dy)
ActionFramescloneTranslated in interface ActionFramesCopyright © 2015. All rights reserved.