@@ -55,16 +55,7 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou
55
55
out_area -> y2 = (out_area -> y2 + self -> y ) * self -> absolute_transform -> dy + self -> absolute_transform -> y ;
56
56
}
57
57
// We might have mirrored due to dx
58
- if (out_area -> x2 < out_area -> x1 ) {
59
- int16_t swap = out_area -> x1 ;
60
- out_area -> x1 = out_area -> x2 ;
61
- out_area -> x2 = swap ;
62
- }
63
- if (out_area -> y2 < out_area -> y1 ) {
64
- int16_t swap = out_area -> y1 ;
65
- out_area -> y1 = out_area -> y2 ;
66
- out_area -> y2 = swap ;
67
- }
58
+ displayio_area_canon (out_area );
68
59
VECTORIO_SHAPE_DEBUG (" out:{(%5d,%5d), (%5d,%5d)}\n" , out_area -> x1 , out_area -> y1 , out_area -> x2 , out_area -> y2 );
69
60
}
70
61
@@ -88,7 +79,7 @@ void common_hal_vectorio_vector_shape_set_dirty(void *vector_shape) {
88
79
self -> ephemeral_dirty_area .x1 , self -> ephemeral_dirty_area .y1 , self -> ephemeral_dirty_area .x2 , self -> ephemeral_dirty_area .y2 );
89
80
self -> dirty = true;
90
81
// Dirty area tracks the shape's footprint between draws. It's reset on refresh finish,
91
- displayio_area_expand (& self -> ephemeral_dirty_area , & current_area );
82
+ displayio_area_union (& self -> ephemeral_dirty_area , & current_area , & self -> ephemeral_dirty_area );
92
83
VECTORIO_SHAPE_DEBUG (" -> expanded:{(%3d,%3d), (%3d,%3d)}\n" , self -> ephemeral_dirty_area .x1 , self -> ephemeral_dirty_area .y1 , self -> ephemeral_dirty_area .x2 , self -> ephemeral_dirty_area .y2 );
93
84
}
94
85
0 commit comments