summaryrefslogtreecommitdiff
path: root/shared-module/vectorio/VectorShape.c
diff options
context:
space:
mode:
authorwarriorofwire <3454741+WarriorOfWire@users.noreply.github.com>2020-05-10 15:36:23 -0700
committerwarriorofwire <3454741+WarriorOfWire@users.noreply.github.com>2020-05-10 15:36:23 -0700
commit58c8e00745064bd290fc9ec18a838960b27c1eea (patch)
treec48c977580d74366d9fe8db24e726d3a62eec949 /shared-module/vectorio/VectorShape.c
parent6660311a96f063e935e85a228f8b12e3a07ca95c (diff)
vectorio: clean up after group removal
VectorShape tells the Group to redraw whatever it left behind when it is removed now.
Diffstat (limited to 'shared-module/vectorio/VectorShape.c')
-rw-r--r--shared-module/vectorio/VectorShape.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c
index b23baa4cf..f57739047 100644
--- a/shared-module/vectorio/VectorShape.c
+++ b/shared-module/vectorio/VectorShape.c
@@ -64,6 +64,13 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou
}
+// For use by Group to know where it needs to redraw on layer removal.
+bool vectorio_vector_shape_get_dirty_area(vectorio_vector_shape_t *self, displayio_area_t *out_area) {
+ displayio_area_copy(&self->ephemeral_dirty_area, out_area);
+ return true; // For now just always redraw.
+}
+
+
// This must be invoked each time a shape changes its position or its shape in any way.
void common_hal_vectorio_vector_shape_set_dirty(void *vector_shape) {
vectorio_vector_shape_t *self = vector_shape;