public class TrimmedTileSet extends TileSet
TileSet.Colorizer| Constructor and Description |
|---|
TrimmedTileSet() |
| Modifier and Type | Method and Description |
|---|---|
Rectangle |
computeTileBounds(int tileIndex,
Rectangle bounds)
Computes and fills in the bounds for the specified tile based on the mechanism used by the
derived class to do such things.
|
int |
getTileCount()
Returns the number of tiles in the tileset.
|
static TrimmedTileSet |
trimTileSet(TileSet source,
OutputStream destImage)
Convenience function to trim the tile set and save it using FastImageIO.
|
static TrimmedTileSet |
trimTileSet(TileSet source,
OutputStream destImage,
String imgFormat)
Creates a trimmed tileset from the supplied source tileset.
|
clone, clone, getImagePath, getName, getRawTileImage, getRawTileSetImage, getTile, getTile, getTile, getTileMirage, getTileMirage, getTileMirages, setImagePath, setImageProvider, setName, toStringpublic int getTileCount()
TileSetgetTileCount in class TileSetpublic Rectangle computeTileBounds(int tileIndex, Rectangle bounds)
TileSetcomputeTileBounds in class TileSettileIndex - the index of the tile whose bounds are to be computed.bounds - the rectangle object into which to fill the bounds.public static TrimmedTileSet trimTileSet(TileSet source, OutputStream destImage) throws IOException
IOExceptionpublic static TrimmedTileSet trimTileSet(TileSet source, OutputStream destImage, String imgFormat) throws IOException
destImage parameter is actually stored on the file system. The image format
indicateds how the resulting image should be saved. If null, we save using FastImageIO
See TileSetTrimmer.trimTileSet(com.threerings.media.tile.TileSet, java.io.OutputStream, com.threerings.media.tile.util.TileSetTrimmer.TrimMetricsReceiver) for further information.IOExceptionCopyright © 2015. All rights reserved.