@@ -145,46 +145,6 @@ static displayio_tilegrid_t *native_tilegrid(mp_obj_t tilegrid_obj) {
145
145
return MP_OBJ_TO_PTR (native_tilegrid );
146
146
}
147
147
148
- /*
149
- static void enforce_bitmap_size(mp_obj_t self_in, mp_obj_t bitmap) {
150
- displayio_tilegrid_t *self = native_tilegrid(self_in);
151
- uint16_t bitmap_width;
152
- uint16_t bitmap_height;
153
- mp_obj_t native = mp_obj_cast_to_native_base(bitmap, &displayio_shape_type);
154
- if (native != MP_OBJ_NULL) {
155
- displayio_shape_t *bmp = MP_OBJ_TO_PTR(native);
156
- bitmap_width = bmp->width;
157
- bitmap_height = bmp->height;
158
- } else if (mp_obj_is_type(bitmap, &displayio_bitmap_type)) {
159
- displayio_bitmap_t *bmp = MP_OBJ_TO_PTR(bitmap);
160
- native = bitmap;
161
- bitmap_width = bmp->width;
162
- bitmap_height = bmp->height;
163
- } else if (mp_obj_is_type(bitmap, &displayio_ondiskbitmap_type)) {
164
- displayio_ondiskbitmap_t *bmp = MP_OBJ_TO_PTR(bitmap);
165
- native = bitmap;
166
- bitmap_width = bmp->width;
167
- bitmap_height = bmp->height;
168
- } else {
169
- mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_bitmap);
170
- }
171
- uint16_t tile_width = self->tile_width;
172
- if (tile_width == 0) {
173
- tile_width = bitmap_width;
174
- }
175
- uint16_t tile_height = self->tile_height;
176
- if (tile_height == 0) {
177
- tile_height = bitmap_height;
178
- }
179
- if (bitmap_width % tile_width != 0) {
180
- mp_raise_ValueError(translate("Tile width must exactly divide bitmap width"));
181
- }
182
- if (bitmap_height % tile_height != 0) {
183
- mp_raise_ValueError(translate("Tile height must exactly divide bitmap height"));
184
- }
185
- }
186
- */
187
-
188
148
//| hidden: bool
189
149
//| """True when the TileGrid is hidden. This may be False even when a part of a hidden Group."""
190
150
//|
0 commit comments