diff --git a/shared-module/displayio/Group.c b/shared-module/displayio/Group.c index b9179f0a00..28d3d89735 100644 --- a/shared-module/displayio/Group.c +++ b/shared-module/displayio/Group.c @@ -358,35 +358,45 @@ void displayio_group_construct(displayio_group_t *self, mp_obj_list_t *members, bool displayio_group_fill_area(displayio_group_t *self, const _displayio_colorspace_t *colorspace, const displayio_area_t *area, uint32_t *mask, uint32_t *buffer) { // Track if any of the layers finishes filling in the given area. We can ignore any remaining // layers at that point. - for (int32_t i = self->members->len - 1; i >= 0; i--) { - mp_obj_t layer; - #if CIRCUITPY_VECTORIO - const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]); - if (draw_protocol != NULL) { - layer = draw_protocol->draw_get_protocol_self(self->members->items[i]); - if (draw_protocol->draw_protocol_impl->draw_fill_area(layer, colorspace, area, mask, buffer)) { - return true; + //mp_printf(&mp_plat_print, "inside fill area \n"); + //mp_printf(&mp_plat_print, "%d \n", self->hidden); + //mp_printf(&mp_plat_print, "\n"); + + //mp_printf(&mp_plat_print, "inside fill area \n"); + if (self->hidden == false){ + //mp_printf(&mp_plat_print, "not hidden\n"); + for (int32_t i = self->members->len - 1; i >= 0; i--) { + mp_obj_t layer; + #if CIRCUITPY_VECTORIO + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]); + if (draw_protocol != NULL) { + layer = draw_protocol->draw_get_protocol_self(self->members->items[i]); + if (draw_protocol->draw_protocol_impl->draw_fill_area(layer, colorspace, area, mask, buffer)) { + return true; + } + continue; } - continue; - } - #endif - layer = mp_obj_cast_to_native_base( - self->members->items[i], &displayio_tilegrid_type); - if (layer != MP_OBJ_NULL) { - if (displayio_tilegrid_fill_area(layer, colorspace, area, mask, buffer)) { - return true; + #endif + layer = mp_obj_cast_to_native_base( + self->members->items[i], &displayio_tilegrid_type); + if (layer != MP_OBJ_NULL) { + if (displayio_tilegrid_fill_area(layer, colorspace, area, mask, buffer)) { + return true; + } + continue; } - continue; - } - layer = mp_obj_cast_to_native_base( - self->members->items[i], &displayio_group_type); - if (layer != MP_OBJ_NULL) { - if (displayio_group_fill_area(layer, colorspace, area, mask, buffer)) { - return true; + layer = mp_obj_cast_to_native_base( + self->members->items[i], &displayio_group_type); + if (layer != MP_OBJ_NULL) { + if (displayio_group_fill_area(layer, colorspace, area, mask, buffer)) { + return true; + } + continue; } - continue; } } + + return false; }