acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
lv_example_line_1.py (571B)
1 # Create an array for the points of the line 2 line_points = [ {"x":5, "y":5}, 3 {"x":70, "y":70}, 4 {"x":120, "y":10}, 5 {"x":180, "y":60}, 6 {"x":240, "y":10}] 7 8 # Create style 9 style_line = lv.style_t() 10 style_line.init() 11 style_line.set_line_width(8) 12 style_line.set_line_color(lv.palette_main(lv.PALETTE.BLUE)) 13 style_line.set_line_rounded(True) 14 15 # Create a line and apply the new style 16 line1 = lv.line(lv.scr_act()) 17 line1.set_points(line_points, 5) # Set the points 18 line1.add_style(style_line, 0) 19 line1.center() 20