diff --git a/src/draw/eve/lv_draw_eve_arc.c b/src/draw/eve/lv_draw_eve_arc.c index f359f78e0c..2a19128c98 100644 --- a/src/draw/eve/lv_draw_eve_arc.c +++ b/src/draw/eve/lv_draw_eve_arc.c @@ -299,23 +299,25 @@ static void draw_eve_arc(lv_draw_task_t * t, const lv_draw_arc_dsc_t * dsc, cons lv_eve_draw_circle_simple(center.x, center.y, radius_in); /* radius_in */ lv_eve_stencil_func(EVE_NOTEQUAL, 1, 0XFF); + lv_eve_stencil_op(EVE_KEEP, EVE_KEEP); lv_eve_blend_func(EVE_SRC_ALPHA, EVE_ONE_MINUS_SRC_ALPHA); lv_eve_color_opa(opa); lv_eve_draw_circle_simple(center.x, center.y, radius_out); /* radius_out */ - lv_eve_restore_context(); - if(dsc->rounded) { - lv_eve_save_context(); - lv_eve_color_opa(opa); - lv_eve_color(color); + lv_eve_stencil_func(EVE_EQUAL, 1, 0XFF); + if(opa < 255) { + lv_eve_stencil_op(EVE_ZERO, EVE_ZERO); + } + int32_t half_width = width / 2; int32_t adjusted_radius = radius_out - half_width; draw_rounded_end(center, adjusted_radius, end_angle, half_width); draw_rounded_end(center, adjusted_radius, start_angle, half_width); - lv_eve_restore_context(); } + + lv_eve_restore_context(); } diff --git a/src/draw/eve/lv_eve.h b/src/draw/eve/lv_eve.h index e341b0e6ef..bd5e5df5fa 100644 --- a/src/draw/eve/lv_eve.h +++ b/src/draw/eve/lv_eve.h @@ -79,7 +79,7 @@ void lv_eve_vertex_2f(int16_t x, int16_t y); void lv_eve_color_mask(uint8_t r, uint8_t g, uint8_t b, uint8_t a); void lv_eve_stencil_func(uint8_t func, uint8_t ref, uint8_t mask); void lv_eve_stencil_op(uint8_t sfail, uint8_t spass); -void lv_eve_blend_func(uint8_t sfail, uint8_t spass); +void lv_eve_blend_func(uint8_t src, uint8_t dst); void lv_eve_draw_circle_simple(int16_t coord_x1, int16_t coord_y1, uint16_t radius_t); void lv_eve_draw_rect_simple(int16_t coord_x1, int16_t coord_y1, int16_t coord_x2, int16_t coord_y2,