]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - displayio/_tilegrid.py
remove setters
[hackapet/Adafruit_Blinka_Displayio.git] / displayio / _tilegrid.py
index 25b0c73ce83e0434ab5b8b46a9f91a83663eacb9..35f5ac14ae48ee24e5a9ead38497630333347a60 100644 (file)
@@ -408,3 +408,23 @@ class TileGrid:
         if not 0 <= value <= 255:
             raise ValueError("Tile value out of bounds")
         self._tiles[index] = value
         if not 0 <= value <= 255:
             raise ValueError("Tile value out of bounds")
         self._tiles[index] = value
+
+    @property
+    def width(self):
+        """Width in tiles"""
+        return self._width
+
+    @property
+    def height(self):
+        """Height in tiles"""
+        return self._height
+
+    @property
+    def tile_width(self):
+        """Width of each tile in pixels"""
+        return self._tile_width
+
+    @property
+    def tile_height(self):
+        """Height of each tile in pixels"""
+        return self._tile_height