APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.tiledmappacker

public Class TileSetLayout

extends Object
Class Inheritance
Imports
java.awt.image.BufferedImage, java.io.IOException, javax.imageio.ImageIO, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.maps.tiled.TiledMapTileSet, com.badlogic.gdx.math.Vector2, com.badlogic.gdx.utils.IntMap

Contains extra information that can only be calculated after a Tiled Map's tile set images are loaded.
Author
David Fraska

Field Summary

Modifier and TypeField and Description
public final int
public final BufferedImage
private final IntMap<Vector2>
private int
private int
public final int

Constructor Summary

AccessConstructor and Description
protected
TileSetLayout(int firstgid, TiledMapTileSet
the tile set to process
tileset
,
FileHandle
the directory in which the tile set image is stored
baseDir
)

Constructs a Tile Set layout.

Method Summary

Modifier and TypeMethod and Description
public Vector2
getLocation(int tile)

Returns the location of the tile in TileSetLayout#image

public int
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

firstgidback to summary
public final int firstgid
imageback to summary
public final BufferedImage image
imageTilePositionsback to summary
private final IntMap<Vector2> imageTilePositions
numColsback to summary
private int numCols
numRowsback to summary
private int numRows
numTilesback to summary
public final int numTiles

Constructor Detail

TileSetLayoutback to summary
protected TileSetLayout(int firstgid, TiledMapTileSet tileset, FileHandle baseDir) throws IOException

Constructs a Tile Set layout. The tile set image contained in the baseDir should be the original tile set images before being processed by TiledMapPacker (the ones actually read by Tiled).

Parameters
tileset:TiledMapTileSet

the tile set to process

baseDir:FileHandle

the directory in which the tile set image is stored

Method Detail

getLocationback to summary
public Vector2 getLocation(int tile)

Returns the location of the tile in TileSetLayout#image

getNumColsback to summary
public int getNumCols()
getNumRowsback to summary
public int getNumRows()