diff --git a/shared-bindings/displayio/TileGrid.c b/shared-bindings/displayio/TileGrid.c index 32a8796a5a..de98dd4076 100644 --- a/shared-bindings/displayio/TileGrid.c +++ b/shared-bindings/displayio/TileGrid.c @@ -145,46 +145,6 @@ static displayio_tilegrid_t *native_tilegrid(mp_obj_t tilegrid_obj) { return MP_OBJ_TO_PTR(native_tilegrid); } -/* -static void enforce_bitmap_size(mp_obj_t self_in, mp_obj_t bitmap) { - displayio_tilegrid_t *self = native_tilegrid(self_in); - uint16_t bitmap_width; - uint16_t bitmap_height; - mp_obj_t native = mp_obj_cast_to_native_base(bitmap, &displayio_shape_type); - if (native != MP_OBJ_NULL) { - displayio_shape_t *bmp = MP_OBJ_TO_PTR(native); - bitmap_width = bmp->width; - bitmap_height = bmp->height; - } else if (mp_obj_is_type(bitmap, &displayio_bitmap_type)) { - displayio_bitmap_t *bmp = MP_OBJ_TO_PTR(bitmap); - native = bitmap; - bitmap_width = bmp->width; - bitmap_height = bmp->height; - } else if (mp_obj_is_type(bitmap, &displayio_ondiskbitmap_type)) { - displayio_ondiskbitmap_t *bmp = MP_OBJ_TO_PTR(bitmap); - native = bitmap; - bitmap_width = bmp->width; - bitmap_height = bmp->height; - } else { - mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_bitmap); - } - uint16_t tile_width = self->tile_width; - if (tile_width == 0) { - tile_width = bitmap_width; - } - uint16_t tile_height = self->tile_height; - if (tile_height == 0) { - tile_height = bitmap_height; - } - if (bitmap_width % tile_width != 0) { - mp_raise_ValueError(translate("Tile width must exactly divide bitmap width")); - } - if (bitmap_height % tile_height != 0) { - mp_raise_ValueError(translate("Tile height must exactly divide bitmap height")); - } -} -*/ - //| hidden: bool //| """True when the TileGrid is hidden. This may be False even when a part of a hidden Group.""" //|