Function TileMap.getUsedRect

Returns a rectangle enclosing the used (non-empty) tiles of the map.

Rect2 getUsedRect() nothrow @nogc;