From 01cd1fed9db974aa616a6289a29171b7a971cd89 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Sep 2023 00:52:09 +0200 Subject: [PATCH] fix(vglite): be sure end_angle > start_angle in arc drawing --- src/draw/nxp/vglite/lv_draw_vglite_arc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/draw/nxp/vglite/lv_draw_vglite_arc.c b/src/draw/nxp/vglite/lv_draw_vglite_arc.c index 39470527d..43e31f43b 100644 --- a/src/draw/nxp/vglite/lv_draw_vglite_arc.c +++ b/src/draw/nxp/vglite/lv_draw_vglite_arc.c @@ -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;