Interface ITileset

All Superinterfaces:
Comparable<Resource>, ICustomPropertyProvider, Resource
All Known Implementing Classes:
Tileset

public interface ITileset extends ICustomPropertyProvider, Resource
  • Method Details

    • getFirstGridId

      int getFirstGridId()
      Gets the first grid id.
      Returns:
      the first grid id
    • getImage

      IMapImage getImage()
      Gets the image.
      Returns:
      the image
    • getSpritesheet

      Spritesheet getSpritesheet()
      Gets the spritesheet that contains the rendered tile images.
      Returns:
      the spritesheet
    • getMargin

      int getMargin()
      Gets the margin (in pixels) between the tileset image edge and the first tile.
      Returns:
      the margin in pixels
    • getSpacing

      int getSpacing()
      Gets the spacing (in pixels) between adjacent tiles in the tileset image.
      Returns:
      the spacing in pixels
    • getTileDimension

      Dimension getTileDimension()
      Gets the tile dimension.
      Returns:
      the tile dimension
    • getColumns

      int getColumns()
      Gets the number of tile columns in the tileset.
      Returns:
      the number of columns
    • getTileOffset

      ITileOffset getTileOffset()
      Gets the per-tileset rendering offset.
      Returns:
      the tile offset
    • getTileHeight

      int getTileHeight()
      Gets the tile height in pixels.
      Returns:
      the tile height
    • getTileWidth

      int getTileWidth()
      Gets the tile width.
      Returns:
      the tile width
    • getTileCount

      int getTileCount()
      Gets the total number of tiles defined by this tileset.
      Returns:
      the tile count
    • getTile

      ITilesetEntry getTile(int id)
      Gets the tileset entry with the given local id.
      Parameters:
      id - the local tile id
      Returns:
      the tileset entry, or null if no such entry exists
    • containsTile

      boolean containsTile(ITile tile)
      Returns whether this tileset contains the supplied tile.
      Parameters:
      tile - the tile to test
      Returns:
      true if this tileset contains the tile
    • containsTile

      boolean containsTile(ITilesetEntry entry)
      Returns whether this tileset contains the supplied tileset entry.
      Parameters:
      entry - the entry to test
      Returns:
      true if this tileset contains the entry
    • containsTile

      boolean containsTile(int tileId)
      Returns whether this tileset contains a tile with the supplied global id.
      Parameters:
      tileId - the global tile id
      Returns:
      true if the global id belongs to this tileset
    • getTerrainSets

      List<ITerrainSet> getTerrainSets()
      Gets the terrain sets defined by this tile set.
      Returns:
      The terrain sets of this instance.