X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/d01c1196ec8319a377b9703b41a58c1f13f19842..964360ae05004ddaaf20df7739bed9e80a62e5a2:/displayio/_tilegrid.py diff --git a/displayio/_tilegrid.py b/displayio/_tilegrid.py index ca3a31f..7fc9189 100644 --- a/displayio/_tilegrid.py +++ b/displayio/_tilegrid.py @@ -444,3 +444,23 @@ class TileGrid: if not 0 <= value <= 255: raise ValueError("Tile value out of bounds") self._tiles[index] = value + + @property + def width(self) -> int: + """Width in tiles""" + return self._width + + @property + def height(self) -> int: + """Height in tiles""" + return self._height + + @property + def tile_width(self) -> int: + """Width of each tile in pixels""" + return self._tile_width + + @property + def tile_height(self) -> int: + """Height of each tile in pixels""" + return self._tile_height