|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.tile.IMImageProvider
com.threerings.cast.bundle.BundledComponentRepository.ResourceBundleProvider
protected class BundledComponentRepository.ResourceBundleProvider
Instances of these provide images to our component action tilesets and frames to our components.
| Field Summary | |
|---|---|
protected ResourceBundle |
_bundle
The resource bundle from which we obtain image data. |
protected Map<String,TileSet> |
_setcache
Cache of tilesets loaded from our bundle. |
| Fields inherited from class com.threerings.media.tile.IMImageProvider |
|---|
_dprov, _imgr, _rset |
| Constructor Summary | |
|---|---|
BundledComponentRepository.ResourceBundleProvider(ImageManager imgr,
ResourceBundle bundle)
Constructs an instance that will obtain image data from the specified resource bundle. |
|
| Method Summary | |
|---|---|
String |
getFramePath(CharacterComponent component,
String action,
String type,
Set<String> existentPaths)
Returns the file path of the animation frames (in the eight sprite directions) for the specified action of the specified component. |
ActionFrames |
getFrames(CharacterComponent component,
String action,
String type)
Returns the animation frames (in the eight sprite directions) for the specified action of the specified component. |
String |
getIdent()
Returns a string identifier for this image data provider which wil be used to differentiate it from other providers and thus should be unique. |
Mirage |
getTileImage(String path,
Rectangle bounds,
Colorization[] zations)
Obtains the tile image with the specified path in the form of a Mirage. |
BufferedImage |
loadImage(String path)
Returns the image at the specified path. |
protected String |
makePath(CharacterComponent component,
String action,
String type)
|
| Methods inherited from class com.threerings.media.tile.IMImageProvider |
|---|
getImageKey, getTileSetImage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ResourceBundle _bundle
protected Map<String,TileSet> _setcache
| Constructor Detail |
|---|
public BundledComponentRepository.ResourceBundleProvider(ImageManager imgr,
ResourceBundle bundle)
| Method Detail |
|---|
public String getIdent()
ImageDataProvider
getIdent in interface ImageDataProvider
public BufferedImage loadImage(String path)
throws IOException
ImageDataProvider
loadImage in interface ImageDataProviderIOException
public ActionFrames getFrames(CharacterComponent component,
String action,
String type)
FrameProvider
getFrames in interface FrameProvider
public String getFramePath(CharacterComponent component,
String action,
String type,
Set<String> existentPaths)
FrameProvider
getFramePath in interface FrameProviderexistentPaths - the set of all paths for which there are valid frames.
protected String makePath(CharacterComponent component,
String action,
String type)
public Mirage getTileImage(String path,
Rectangle bounds,
Colorization[] zations)
ImageProviderMirage. It should be
cropped from the tileset image identified by the supplied path.
getTileImage in interface ImageProvidergetTileImage in class IMImageProviderpath - the path that identifies the desired image (corresponds to the image path from
the tileset).bounds - if non-null, the region of the image to be returned as a mirage. If null, the
entire image should be returned.zations - if non-null, colorizations to apply to the image before converting it into a
mirage.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||