当前位置:网站首页>LVGL 8.2 Line
LVGL 8.2 Line
2022-07-04 14:35:00 【Fairy sword love】
Simple Line
{
/*Create an array for the points of the line*/
static lv_point_t line_points[] = {
{
5, 5}, {
70, 70}, {
120, 10}, {
180, 60}, {
240,10} }; // 5 Coordinate values of points
/*Create style*/
static lv_style_t style_line;
lv_style_init(&style_line);
lv_style_set_line_width(&style_line, 8); // Set the line width
lv_style_set_line_color(&style_line, lv_palette_main(LV_PALETTE_BLUE));// Set the line color to blue
lv_style_set_line_rounded(&style_line, true); // Enable line fillet function
/*Create a line and apply the new style*/
lv_obj_t* line1;
line1 = lv_line_create(lv_scr_act()); // Create a line object
lv_line_set_points(line1, line_points, 5); // Set the number of line data points
lv_obj_add_style(line1, &style_line, 0); // Line addition style
lv_obj_center(line1); // centered
}
Running effect

- Change the line color to red
lv_style_set_line_color(&style_line, lv_palette_main(LV_PALETTE_RED));
- Running effect

- Turn off the fillet function
lv_style_set_line_rounded(&style_line, false);

- Change the line width to 1
lv_style_set_line_width(&style_line, 1);
- Running effect

边栏推荐
- LVLG 8.2 circular scrolling animation of a label
- sql优化之查询优化器
- AI与生命科学
- Popular framework: the use of glide
- MySQL的存储过程练习题
- [cloud native] how can I compete with this database?
- 炒股网上开户安全吗?会不会被骗。
- Detailed index of MySQL
- Pandora IOT development board learning (RT thread) - Experiment 3 button experiment (learning notes)
- C language programming
猜你喜欢

数据中台概念

Compile oglpg-9th-edition source code with clion

程序员自曝接私活:10个月时间接了30多个单子,纯收入40万

【MySQL从入门到精通】【高级篇】(四)MySQL权限管理与控制

基于51单片机的超声波测距仪

No servers available for service: xxxx

Sqlserver functions, creation and use of stored procedures

nowcoder重排链表

LVGL 8.2 Line wrap, recoloring and scrolling

The implementation of OSD on rk1126 platform supports color translucency and multi-channel support for Chinese
随机推荐
PyTorch的自动求导机制详细解析,PyTorch的核心魔法
LVGL 8.2 List
Real time data warehouse
nowcoder重排链表
codeforce:C. Sum of Substrings【边界处理 + 贡献思维 + 灵光一现】
【C语言】指针笔试题
[information retrieval] link analysis
flink sql-client. SH tutorial
leetcode:6110. The number of incremental paths in the grid graph [DFS + cache]
Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering
Gin integrated Alipay payment
Ml: introduction, principle, use method and detailed introduction of classic cases of snap value
R language dplyr package summary_ If function calculates the mean and median of all numerical data columns in dataframe data, and summarizes all numerical variables based on conditions
A keepalived high availability accident made me learn it again
一种架构来完成所有任务—Transformer架构正在以一己之力统一AI江湖
MySQL的触发器
[algorithm leetcode] interview question 04.03 Specific depth node linked list (Multilingual Implementation)
数据中台概念
Leetcode t49: grouping of alphabetic words
A collection of classic papers on convolutional neural networks (deep learning classification)