2021-04-08 13:07:48 +02:00
|
|
|
#include "../lv_examples.h"
|
2021-05-27 11:50:04 +02:00
|
|
|
#if LV_BUILD_EXAMPLES && LV_USE_ARC
|
2021-02-19 14:47:32 +01:00
|
|
|
|
|
|
|
/**
|
2021-05-27 11:50:04 +02:00
|
|
|
* Using the Arc style properties
|
2021-02-19 14:47:32 +01:00
|
|
|
*/
|
|
|
|
void lv_example_style_7(void)
|
|
|
|
{
|
|
|
|
static lv_style_t style;
|
|
|
|
lv_style_init(&style);
|
|
|
|
|
2021-05-27 11:50:04 +02:00
|
|
|
lv_style_set_arc_color(&style, lv_palette_main(LV_PALETTE_RED));
|
|
|
|
lv_style_set_arc_width(&style, 4);
|
2021-02-19 14:47:32 +01:00
|
|
|
|
|
|
|
/*Create an object with the new style*/
|
2023-10-12 20:37:27 +02:00
|
|
|
lv_obj_t * obj = lv_arc_create(lv_screen_active());
|
2021-03-31 19:57:14 +02:00
|
|
|
lv_obj_add_style(obj, &style, 0);
|
2021-03-25 16:14:17 +01:00
|
|
|
lv_obj_center(obj);
|
2021-02-19 14:47:32 +01:00
|
|
|
}
|
|
|
|
#endif
|