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 |
line.md (1454B)
1 ```eval_rst 2 .. include:: /header.rst 3 :github_url: |github_link_base|/widgets/core/line.md 4 ``` 5 # Line (lv_line) 6 7 ## Overview 8 The Line object is capable of drawing straight lines between a set of points. 9 10 ## Parts and Styles 11 - `LV_PART_MAIN` uses all the typical background properties and line style properties. 12 13 ## Usage 14 15 ### Set points 16 The points have to be stored in an `lv_point_t` array and passed to the object by the `lv_line_set_points(lines, point_array, point_cnt)` function. 17 18 ### Auto-size 19 By default, the Line's width and height are set to `LV_SIZE_CONTENT`. This means it will automatically set its size to fit all the points. If the size is set explicitly, parts on the line may not be visible. 20 21 ### Invert y 22 By default, the *y == 0* point is in the top of the object. It might be counter-intuitive in some cases so the y coordinates can be inverted with `lv_line_set_y_invert(line, true)`. In this case, *y == 0* will be the bottom of the object. 23 *y invert* is disabled by default. 24 25 ## Events 26 Only the [Generic events](../overview/event.html#generic-events) are sent by the object type. 27 28 See the events of the [Base object](/widgets/obj) too. 29 30 Learn more about [Events](/overview/event). 31 32 ## Keys 33 No *Keys* are processed by the object type. 34 35 Learn more about [Keys](/overview/indev). 36 37 ## Example 38 39 ```eval_rst 40 41 .. include:: ../../../examples/widgets/line/index.rst 42 43 ``` 44 45 ## API 46 47 ```eval_rst 48 49 .. doxygenfile:: lv_line.h 50 :project: lvgl 51 52 ```