lv_example_style_7.c 471 B

12345678910111213141516171819202122
  1. #include "../lv_examples.h"
  2. #if LV_BUILD_EXAMPLES && LV_USE_ARC
  3. /**
  4. * Using the Arc style properties
  5. */
  6. void lv_example_style_7(void)
  7. {
  8. static lv_style_t style;
  9. lv_style_init(&style);
  10. lv_style_set_arc_color(&style, lv_palette_main(LV_PALETTE_RED));
  11. lv_style_set_arc_width(&style, 4);
  12. /*Create an object with the new style*/
  13. lv_obj_t * obj = lv_arc_create(lv_scr_act());
  14. lv_obj_add_style(obj, &style, 0);
  15. lv_obj_center(obj);
  16. }
  17. #endif