public class ArrayTileLayer extends TiledTileLayer
An ArrayTileLayer is a type of TiledTileLayer that stores its tile data in a rectangular two-dimensional array. An ArrayTileLayer's memory usage, and the time needed to iterate through the set of its tile locations, are both proportional to the area in square tiles of the smallest rectangle that fits around all of the tiles in the tile layer it represents. A TiledReader automatically chooses whether to represent each tile layer it reads with an ArrayTileLayer or a HashTileLayer, based on an estimate of which would use less memory.
| Modifier and Type | Method and Description |
|---|---|
TiledTile |
getTile(int x,
int y)
Returns the tile at the specified location in this tile layer's grid, or
null if there is none.
|
boolean |
getTileDiagonalFlip(int x,
int y)
Returns whether the tile at the specified location in this tile layer's
grid is flipped diagonally, or false if there is no tile there.
|
boolean |
getTileHorizontalFlip(int x,
int y)
Returns whether the tile at the specified location in this tile layer's
grid is flipped horizontally, or false if there is no tile there.
|
Set<Point> |
getTileLocations()
Returns an unmodifiable Set view of the (x, y) locations in this tile
layer's grid where tiles are located.
|
boolean |
getTileVerticalFlip(int x,
int y)
Returns whether the tile at the specified location in this tile layer's
grid is flipped vertically, or false if there is no tile there.
|
int |
getX1()
Returns the lowest x-coordinate in tiles of any tile in this tile layer,
or 0 if this tile layer has no tiles.
|
int |
getX2()
Returns the highest x-coordinate in tiles of any tile in this tile layer,
or -1 if this tile layer has no tiles.
|
int |
getY1()
Returns the lowest y-coordinate in tiles of any tile in this tile layer,
or 0 if this tile layer has no tiles.
|
int |
getY2()
Returns the highest y-coordinate in tiles of any tile in this tile layer,
or -1 if this tile layer has no tiles.
|
getAbsOffsetX, getAbsOffsetY, getAbsOpacity, getAbsTintColor, getAbsVisible, getName, getParent, getProperties, getProperty, getRelOffsetX, getRelOffsetY, getRelOpacity, getRelTintColor, getRelVisiblepublic final Set<Point> getTileLocations()
TiledTileLayergetTileLocations in class TiledTileLayerpublic final int getX1()
TiledTileLayergetX1 in class TiledTileLayerpublic final int getY1()
TiledTileLayergetY1 in class TiledTileLayerpublic final int getX2()
TiledTileLayergetX2 in class TiledTileLayerpublic final int getY2()
TiledTileLayergetY2 in class TiledTileLayerpublic final TiledTile getTile(int x, int y)
TiledTileLayergetTile in class TiledTileLayerx - The x-coordinate in tiles of the locationy - The y-coordinate in tiles of the locationpublic final boolean getTileHorizontalFlip(int x,
int y)
TiledTileLayergetTileHorizontalFlip in class TiledTileLayerx - The x-coordinate in tiles of the locationy - The y-coordinate in tiles of the locationpublic final boolean getTileVerticalFlip(int x,
int y)
TiledTileLayergetTileVerticalFlip in class TiledTileLayerx - The x-coordinate in tiles of the locationy - The y-coordinate in tiles of the locationpublic final boolean getTileDiagonalFlip(int x,
int y)
TiledTileLayergetTileDiagonalFlip in class TiledTileLayerx - The x-coordinate in tiles of the locationy - The y-coordinate in tiles of the locationCopyright © 2020. All rights reserved.