How to use lvgl 7.0.1 to draw a sector?

this is my draw circle code.

lv_color_t cbuf[LV_CANVAS_BUF_SIZE_TRUE_COLOR(100, 100)];
lv_obj_t * canvas = lv_canvas_create(lv_scr_act(), NULL);
lv_canvas_set_buffer(canvas, cbuf, 100, 100, LV_IMG_CF_TRUE_COLOR_ALPHA);
lv_obj_align(canvas, NULL, LV_ALIGN_CENTER, 0, 0);
lv_canvas_fill_bg(canvas, LV_COLOR_WHITE,LV_OPA_TRANSP);
lv_draw_line_dsc_t sytll;
sytll.color.full = 255;
sytll.color = LV_COLOR_RED;
sytll.width = 1;
sytll.opa = LV_OPA_COVER;

i find this api in canvas.c.
it can draw circle and set start/end degree. but i don’t know how to fill this circle.
does anything parameter can set it fill by use this api?

i try to use another api to do it.

static lv_style_t m_pointStyle;
lv_style_set_bg_color( &m_pointStyle, LV_STATE_CHECKED, LV_COLOR_RED );
lv_style_set_bg_color( &m_pointStyle, LV_STATE_DEFAULT, LV_COLOR_GREEN );
lv_style_set_bg_grad_color(&m_pointStyle, LV_STATE_DEFAULT, LV_COLOR_GREEN);
lv_style_set_bg_grad_color(&m_pointStyle, LV_STATE_CHECKED, LV_COLOR_RED);
lv_style_set_bg_opa(&m_pointStyle, LV_STATE_DEFAULT, LV_OPA_COVER);
lv_style_set_radius( &m_pointStyle, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE );
lv_style_set_radius( &m_pointStyle, LV_STATE_CHECKED, LV_RADIUS_CIRCLE );
lv_style_set_border_color(&m_pointStyle, LV_STATE_DEFAULT, LV_COLOR_GREEN);
lv_style_set_border_color(&m_pointStyle, LV_STATE_CHECKED, LV_COLOR_GREEN);
lv_style_set_bg_opa( &m_pointStyle, LV_STATE_CHECKED, LV_OPA_COVER );
lv_style_set_border_opa( &m_pointStyle, LV_STATE_DEFAULT, LV_OPA_COVER );
lv_style_set_border_width( &m_pointStyle, LV_STATE_CHECKED, 2 );
lv_obj_t * obj3;
obj3 = lv_obj_create(h, NULL);
lv_obj_add_style(obj3, LV_LABEL_PART_MAIN, &m_pointStyle);
lv_obj_set_size(obj3, 40, 40);

this code just draw fill circle, but can’t set draw with start/end degree like lv_canvas_draw_arc.

i want to draw multiple sector and finish pie chart.

Can anyone help me?


I find other ways to achieve it.
when i set lv_draw_line_dsc_t width as circle radius. it looks fill circle.
I do not know if this is the right or not.