How can I change the line tickness of arc in v8.0?


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


What LVGL version are you using?


What do you want to achieve?

change the thickness of arc.

What have you tried so far?

Referencing the example, I implemented like below. but thickness isn’t changed. ( it’s still shown as default thickness )

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_style_t style1;
lv_style_set_line_width(&style1, 1);

lv_obj_t * arc = lv_arc_create(lv_scr_act());
lv_obj_set_style_arc_img_src(arc, &test , 0 );
lv_obj_add_style(arc, &style1, 0);

lv_arc_set_rotation(arc, 270);
lv_arc_set_bg_angles(arc, 0, 360);
lv_obj_remove_style(arc, NULL, LV_PART_KNOB);   /*Be sure the knob is not displayed*/
lv_obj_clear_flag(arc, LV_OBJ_FLAG_CLICKABLE);  /*To not allow adjusting by click*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

Hi Jaeho,

You can use these APIs to change the thickness of arc and it’s indicator.

lv_obj_set_style_arc_width(arc, NEEDED_THICKNESS, 0);
lv_obj_set_style_arc_width(arc, NEEDED_THICKNESS, LV_PART_INDICATOR);