Skip to content

Commit 56362a9

Browse files
committed
remove duplicated code, replace with displayio_area_canon
1 parent 9485805 commit 56362a9

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

shared-module/vectorio/VectorShape.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,7 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou
5555
out_area->y2 = (out_area->y2 + self->y) * self->absolute_transform->dy + self->absolute_transform->y;
5656
}
5757
// 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);
6859
VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2);
6960
}
7061

0 commit comments

Comments
 (0)