my lcd size: 160*160
my lcd color depth: 1
One:
static lv_style_t style2;
lv_style_init(&style2);
lv_color1_t lvc1;
lvc1.full = 0x01;
lv_style_set_line_width(&style2, LV_STATE_DEFAULT, 3);
lv_style_set_bg_color(&style2, LV_STATE_DEFAULT, lvc1);
lvc1.full = 0x00;
lv_style_set_line_color(&style2, LV_STATE_DEFAULT, lvc1);
/*Create an Arc*/
lv_obj_t * arc = lv_arc_create(lv_scr_act(), NULL);
lv_obj_add_style(arc, LV_OBJ_PART_MAIN, &style2);
lv_obj_set_size(arc, 60, 60);
lv_arc_set_bg_angles(arc, 0, 360);
lv_arc_set_angles(arc, 0, 270);
lv_obj_align(arc, NULL, LV_ALIGN_CENTER, 0, 0);
Results: The background is white, black is 270 to 360 of a circular arc and a line width of 3;
Two:
static lv_style_t style2;
lv_style_init(&style2);
lv_color1_t lvc1;
lvc1.full = 0x00;
lv_style_set_line_width(&style2, LV_STATE_DEFAULT, 3);
lv_style_set_bg_color(&style2, LV_STATE_DEFAULT, lvc1);
lvc1.full = 0x01;
lv_style_set_line_color(&style2, LV_STATE_DEFAULT, lvc1);
/*Create an Arc*/
lv_obj_t * arc = lv_arc_create(lv_scr_act(), NULL);
lv_obj_add_style(arc, LV_OBJ_PART_MAIN, &style2);
lv_obj_set_size(arc, 60, 60);
lv_arc_set_bg_angles(arc, 0, 360);
lv_arc_set_angles(arc, 0, 270);
lv_obj_align(arc, NULL, LV_ALIGN_CENTER, 0, 0);
Results: square shaped black background, white arc ranges from 0 to 270 and a line width of 9;
But I just want a white background, black arc of the normal range.