TileImage

interface TileImage : TileComposite, TilesetHolder

An immutable TileComposite. It is completely in memory but it can be drawn onto TileGraphicss and its derivatives. Also supports operations for combining with other TileImages and converting to TileGraphics.

Functions

combineWith
Link copied to clipboard
common
abstract fun combineWith(tileImage: TileImage, offset: Position): TileImage
This method creates a new TileImage which is the combination of this one and the supplied tileImage.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
getTileAt
Link copied to clipboard
common
open fun getTileAt(position: Position): Maybe<Tile>
Returns the Tile stored at a particular position in this TileComposite.
getTileAtOrNull
Link copied to clipboard
common
open fun getTileAtOrNull(position: Position): Tile?
Returns the Tile stored at a particular position or null if there is no such Tile.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
toString
Link copied to clipboard
common
open fun toString(): String
toSubImage
Link copied to clipboard
common
abstract fun toSubImage(offset: Position, size: Size): TileImage
Returns a part of this TileImage as a new TileImage.
toTileGraphics
Link copied to clipboard
common
abstract fun toTileGraphics(): TileGraphics
Returns a copy of this TileImage as a TileGraphics.
transform
Link copied to clipboard
common
abstract fun transform(transformer: (Tile) -> Tile): TileImage
Transforms all of the Tiles in this TileImage with the given transformer and returns a new one with the transformed characters.
withFiller
Link copied to clipboard
common
abstract fun withFiller(filler: Tile): TileImage
Fills the empty parts of this TileImage with the given filler.
withNewSize
Link copied to clipboard
common
abstract fun withNewSize(newSize: Size): TileImage
Returns a copy of this image resized to a new size.
abstract fun withNewSize(newSize: Size, filler: Tile): TileImage
Returns a copy of this image resized to a new size and using a specified filler Tile if the new size is larger than the old and we need to fill in empty areas.
withStyle
Link copied to clipboard
common
abstract fun withStyle(styleSet: StyleSet): TileImage
Applies the given StyleSet to the Tiles in this TileImage and returns a new TileImage with the result.
withTileAt
Link copied to clipboard
common
abstract fun withTileAt(position: Position, tile: Tile): TileImage
Returns a new TileImage with the supplied tile set at the given position.
withTileset
Link copied to clipboard
common
abstract fun withTileset(tileset: TilesetResource): TileImage
Creates a copy of this TileImage which uses the given tileset.

Properties

height
Link copied to clipboard
common
open override val height: Int
size
Link copied to clipboard
common
abstract override val size: Size
tiles
Link copied to clipboard
common
abstract override val tiles: PersistentMap<Position, Tile>
The Tiles this TileComposite contains.
tileset
Link copied to clipboard
common
abstract val tileset: TilesetResource
width
Link copied to clipboard
common
open override val width: Int

Inheritors

BaseTileImage
Link copied to clipboard

Sources

(source)
Link copied to clipboard