remove duplicated code, replace with displayio_area_canon
This commit is contained in:
parent
9485805b6a
commit
56362a9806
@ -55,16 +55,7 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou
|
||||
out_area->y2 = (out_area->y2 + self->y) * self->absolute_transform->dy + self->absolute_transform->y;
|
||||
}
|
||||
// We might have mirrored due to dx
|
||||
if (out_area->x2 < out_area->x1) {
|
||||
int16_t swap = out_area->x1;
|
||||
out_area->x1 = out_area->x2;
|
||||
out_area->x2 = swap;
|
||||
}
|
||||
if (out_area->y2 < out_area->y1) {
|
||||
int16_t swap = out_area->y1;
|
||||
out_area->y1 = out_area->y2;
|
||||
out_area->y2 = swap;
|
||||
}
|
||||
displayio_area_canon(out_area);
|
||||
VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user