lv_example_style_9.py 384 B

12345678910111213141516171819202122
  1. #
  2. # Using the line style properties
  3. #
  4. style = lv.style_t()
  5. style.init()
  6. style.set_line_color(lv.palette_main(lv.PALETTE.GREY))
  7. style.set_line_width(6)
  8. style.set_line_rounded(True)
  9. # Create an object with the new style
  10. obj = lv.line(lv.scr_act())
  11. obj.add_style(style, 0)
  12. p = [ {"x":10, "y":30},
  13. {"x":30, "y":50},
  14. {"x":100, "y":0}]
  15. obj.set_points(p, 3)
  16. obj.center()