toSubTileGraphics

abstract fun toSubTileGraphics(rect: Rect): TileGraphics

This function can be used to create an editable "window" over the underlying TileGraphics. Writing is restricted to the area represented by rect so if rect consists of Position(1, 1) and Size(2, 2), the resulting TileGraphics will have a size of (2, 2) and writing to it will write to the original graphics' surface, offset by Position(1, 1).

Sources

(source)
Link copied to clipboard