1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(vglite): be sure end_angle > start_angle in arc drawing

This commit is contained in:
Gabor Kiss-Vamosi 2023-09-15 00:52:09 +02:00
parent 28094404ad
commit 01cd1fed9d

View File

@ -595,6 +595,8 @@ static void add_split_arc_path(int32_t * arc_path, int * pidx, vg_arc * q_arc, c
static void add_arc_path(int32_t * arc_path, int * pidx, int32_t radius,
int32_t start_angle, int32_t end_angle, const lv_point_t * center, bool cw)
{
if (end_angle < start_angle) end_angle += 360;
/* set number of arcs to draw */
vg_arc q_arc;
int32_t start_arc_angle = start_angle % 90;