1 #include "../lv_examples.h"
2 #if LV_BUILD_EXAMPLES && LV_USE_LINE
3
4 /**
5 * Using the line style properties
6 */
lv_example_style_9(void)7 void lv_example_style_9(void)
8 {
9 static lv_style_t style;
10 lv_style_init(&style);
11
12 lv_style_set_line_color(&style, lv_palette_main(LV_PALETTE_GREY));
13 lv_style_set_line_width(&style, 6);
14 lv_style_set_line_rounded(&style, true);
15
16 /*Create an object with the new style*/
17 lv_obj_t * obj = lv_line_create(lv_scr_act());
18 lv_obj_add_style(obj, &style, 0);
19
20 static lv_point_t p[] = {{10, 30}, {30, 50}, {100, 0}};
21 lv_line_set_points(obj, p, 3);
22
23 lv_obj_center(obj);
24 }
25
26 #endif
27