当前位置:网站首页>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

边栏推荐
- codeforce:C. Sum of Substrings【边界处理 + 贡献思维 + 灵光一现】
- flink sql-client.sh 使用教程
- Solutions aux problèmes d'utilisation de l'au ou du povo 2 dans le riz rouge k20pro MIUI 12.5
- R language uses the DOTPLOT function of epidisplay package to visualize the frequency of data points in different intervals in the form of point graph, and uses the by parameter to specify the groupin
- 《opencv学习笔记》-- 线性滤波:方框滤波、均值滤波、高斯滤波
- [cloud native] how can I compete with this database?
- Docker compose public network deployment redis sentinel mode
- Combined with case: the usage of the lowest API (processfunction) in Flink framework
- C # WPF realizes the real-time screen capture function of screen capture box
- Redis daily notes
猜你喜欢

WT588F02B-8S(C006_03)单芯片语音ic方案为智能门铃设计降本增效赋能

软件测试之测试评估

商業智能BI財務分析,狹義的財務分析和廣義的財務分析有何不同?

Detailed explanation of visual studio debugging methods

使用CLion编译OGLPG-9th-Edition源码

Detailed index of MySQL

Real time data warehouse

The implementation of OSD on rk1126 platform supports color translucency and multi-channel support for Chinese

Excel quickly merges multiple rows of data

(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
随机推荐
使用CLion编译OGLPG-9th-Edition源码
[algorithm leetcode] interview question 04.03 Specific depth node linked list (Multilingual Implementation)
第十六章 字符串本地化和消息字典(二)
The implementation of OSD on rk1126 platform supports color translucency and multi-channel support for Chinese
Docker compose public network deployment redis sentinel mode
MySQL的存储过程练习题
Industrial Internet has greater development potential and more industry scenarios
数据中台概念
No servers available for service: xxxx
Leetcode t49: grouping of alphabetic words
Classify boost libraries by function
A collection of classic papers on convolutional neural networks (deep learning classification)
C language programming
sql优化之查询优化器
flink sql-client.sh 使用教程
Leetcode 61: 旋转链表
Test process arrangement (3)
Oppo find N2 product form first exposure: supplement all short boards
聊聊保证线程安全的 10 个小技巧
NowCoder 反转链表