draw

open override fun draw(tile: Tile, drawPosition: Position)

Draws the given Tile on this TileGraphics at the given drawPosition. Drawing the empty tile (Tile.empty) will result in the deletion of the Tile at drawPosition.

open override fun draw(tileMap: Map<Position, Tile>, drawPosition: Position, drawArea: Size)

Draws the given tileMap onto this TileGraphics. If the tileMap has Tiles which are not contained within the size of this TileGraphics they will be ignored.

Parameters

tileMap

Position -> Tile mappings which contains the Tiles to draw. the Positions will be offset with drawPosition when drawing

drawPosition

the starting position of the drawing relative to the top left corner of this TileGraphics. The default is Positions.zero.

drawArea

the sub-section of the tileMap to which the Tiles should be drawn Example: If this DrawSurface has the size of (3,3), drawPosition is (1,1) and drawArea is (2,2) the following positions will be overwritten: (1,1), (2,1), (1,2), (2,2)

open override fun draw(tileComposite: TileComposite)

Same as draw with tileMap, but TileComposite.tiles will be use as the Map.