CharacterTileString

interface CharacterTileString : Iterable<CharacterTile> , TileComposite

A CharacterTileString is an aggregation of CharacterTiles. You can draw a CharacterTileString on a TileGraphics and you can expect it to behave in a way like handwriting would (if a string does not fit in a line it continues in a new line).

Text wrapping is managed by the TextWrap enum.

If a CharacterTileString is too long to fit on a DrawSurface the parts which would overflow are truncated instead.

If there is no wrapping and the text reaches the end of the line it will also be truncated.

CharacterTileString comes with its own builder and you can create them in a simple way from plain Java Strings.

Functions

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
iterator
Link copied to clipboard
common
abstract operator fun iterator(): Iterator<CharacterTile>
plus
Link copied to clipboard
common
abstract operator fun plus(other: CharacterTileString): CharacterTileString
Creates a new CharacterTileString which contains the contents of this one and the other one.
toString
Link copied to clipboard
common
open fun toString(): String
withSize
Link copied to clipboard
common
abstract fun withSize(size: Size): CharacterTileString
Returns a new CharacterTileString with the given size using the contents of this one.

Properties

characterTiles
Link copied to clipboard
common
abstract val characterTiles: List<CharacterTile>
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.
width
Link copied to clipboard
common
open override val width: Int

Inheritors

DefaultCharacterTileString
Link copied to clipboard

Sources

(source)
Link copied to clipboard