Use "lv_canvas_draw_arc" draw fill circle has an outline


When use lv_canvas_draw_arc draw a full fill circle with a color, if draw again in the same position and the same radius, but different color, will leave a circle the circle color is the first draw color.

What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?


What do you want to achieve?

NO circle, when I draw new fill circle in the same position.

What have you tried so far?

I try set the canvas style, border_width and outline_width to 0, but no help.

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

static lv_color_t *cbuf1;
static lv_obj_t *canvas;
static lv_draw_arc_dsc_t arc_dsc;
static bool flag = false;

void my_timer(lv_timer_t * timer)
    flag = !flag;
    if (flag) {
        arc_dsc.color = lv_color_make(0x00, 0x00, 0xff);
        lv_canvas_draw_arc(canvas, 100, 100, 30, 0, 360, &arc_dsc);
    } else {
        arc_dsc.color = lv_color_make(0xff, 0xff, 0xff);
        lv_canvas_draw_arc(canvas, 100, 100, 30, 0, 360, &arc_dsc);

void user_app(void) {
    static uint32_t user_data = 10;
    lv_timer_t * timer = lv_timer_create(my_timer, 1000,  &user_data);

    cbuf1 = (lv_color_t*)malloc(320 * 240 * sizeof(lv_color_t));

    canvas = lv_canvas_create(lv_scr_act());
    lv_canvas_set_buffer(canvas, cbuf1, 320, 240, LV_IMG_CF_TRUE_COLOR);
    lv_obj_set_pos(canvas, 0, 0);
    lv_canvas_fill_bg(canvas, lv_color_white(), LV_OPA_COVER);
    // no help
    lv_obj_set_style_border_width(canvas, 0, 0);
    lv_obj_set_style_border_opa(canvas, LV_OPA_TRANSP, 0);
    lv_obj_set_style_outline_width(canvas, 0, 0);
    lv_obj_set_style_outline_opa(canvas, LV_OPA_TRANSP, 0);

    arc_dsc.color = lv_color_make(0x00, 0x00, 0xff);
    arc_dsc.width = 30;
    arc_dsc.rounded = 1;

Screenshot and/or video


:flushed: Has anyone encountered this problem?