]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - displayio/_tilegrid.py
Merge pull request #91 from FoamyGuy/bitmap_setter
[hackapet/Adafruit_Blinka_Displayio.git] / displayio / _tilegrid.py
index ca3a31f0d7340512075b2f693675d42b74c172dc..7fc9189a4dcdca4b98dc0ddc0862e2554b1c809d 100644 (file)
@@ -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