DrawSurface

interface DrawSurface : Clearable, TileComposite, TilesetOverride

A DrawSurface is a TileComposite which implements draw and mutation operations such as:

Functions

applyStyle
Link copied to clipboard
common
abstract fun applyStyle(styleSet: StyleSet)
Applies the given styleSet to all currently present Tiles in this TileGraphics.
clear
Link copied to clipboard
common
abstract fun clear()
Clears this Clearable.
draw
Link copied to clipboard
common
abstract fun draw(tileMap: Map<Position, Tile>)
Same as draw with 3 parameters, with the difference that size will be used for drawArea, and Position.zero as drawPosition
abstract fun draw(tileComposite: TileComposite)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
abstract fun draw(tileMap: Map<Position, Tile>, drawPosition: Position)
Same as draw with 3 parameters, with the difference that size will be used for drawArea.
abstract fun draw(tile: Tile, drawPosition: Position)
Draws the given Tile on this TileGraphics at the given drawPosition.
abstract fun draw(tileComposite: TileComposite, drawPosition: Position)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
abstract fun draw(tileMap: Map<Position, Tile>, drawPosition: Position, drawArea: Size)
Draws the given tileMap onto this TileGraphics.
abstract fun draw(tileComposite: TileComposite, drawPosition: Position, drawArea: Size)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
fill
Link copied to clipboard
common
abstract fun fill(filler: Tile)
Fills the empty parts of this TileGraphics with the given filler.
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
transform
Link copied to clipboard
common
abstract fun transform(transformer: (Position, Tile) -> Tile)
Transforms all of the Tiles in this TileGraphics with the given transformer and overwrites them with the results of calling transformer.

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 val tiles: Map<Position, Tile>
The Tiles this TileComposite contains.
tileset
Link copied to clipboard
common
abstract override var tileset: TilesetResource
The (mutable) tileset value.
tilesetProperty
Link copied to clipboard
common
abstract val tilesetProperty: Property<TilesetResource>
A Property that wraps the tileset and offers data binding and observability features.
width
Link copied to clipboard
common
open override val width: Int

Inheritors

TileGraphics
Link copied to clipboard
TileGrid
Link copied to clipboard

Sources

(source)
Link copied to clipboard