当前位置:网站首页>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
边栏推荐
- Map of mL: Based on Boston house price regression prediction data set, an interpretable case is realized by using the map value to the LIR linear regression model
- 【MySQL从入门到精通】【高级篇】(四)MySQL权限管理与控制
- Digi XBee 3 RF: 4个协议,3种封装,10个大功能
- 阿里被裁员工,找工作第N天,猎头又传来噩耗...
- LVGL 8.2 LED
- Programmer turns direction
- Learn kernel 3: use GDB to track the kernel call chain
- flink sql-client. SH tutorial
- opencv3.2 和opencv2.4安装
- Industrial Internet has greater development potential and more industry scenarios
猜你喜欢
聊聊保证线程安全的 10 个小技巧
Classify boost libraries by function
Oppo find N2 product form first exposure: supplement all short boards
Combined with case: the usage of the lowest API (processfunction) in Flink framework
Data center concept
Learn kernel 3: use GDB to track the kernel call chain
flink sql-client.sh 使用教程
No servers available for service: xxxx
Data Lake (13): spark and iceberg integrate DDL operations
Docker compose public network deployment redis sentinel mode
随机推荐
第十六章 字符串本地化和消息字典(二)
LifeCycle
Redis daily notes
No servers available for service: xxxx
【算法leetcode】面试题 04.03. 特定深度节点链表(多语言实现)
ML之shap:基于boston波士顿房价回归预测数据集利用Shap值对LiR线性回归模型实现可解释性案例
Excel quickly merges multiple rows of data
C language personal address book management system
WT588F02B-8S(C006_03)单芯片语音ic方案为智能门铃设计降本增效赋能
实战解惑 | OpenCV中如何提取不规则ROI区域
Map of mL: Based on Boston house price regression prediction data set, an interpretable case is realized by using the map value to the LIR linear regression model
Ultrasonic distance meter based on 51 single chip microcomputer
leetcode:6110. 网格图中递增路径的数目【dfs + cache】
开发中常见问题总结
redis 日常笔记
Leetcode t47: full arrangement II
An overview of 2D human posture estimation
炒股网上开户安全吗?会不会被骗。
产业互联网则具备更大的发展潜能,具备更多的行业场景
Data center concept