Lua 应用开发LVGL控件
CurvedLabel
弧形文本控件
继承自 Object
⚠️ 该控件在模拟器的 debug.getregistry["widgets"] 中未注册,可能仅在特定硬件设备上可用。API 签名基于源码分析,待设备验证。
创建
local curved = parent:CurvedLabel {
w = 200, h = 100,
text = "LuaVGL Curved Label",
radius = 80,
angle_start = 180,
angle_range = 180,
}属性
| 属性 | 类型 | 说明 |
|---|---|---|
text | string | 显示文本 |
radius | number | 弧形半径 |
angle_start | number | 起始角度(度) |
angle_range | number | 文字分布角度范围 |
font | lvgl.Font | 字体 |
text_color | lvgl.Color | 文本颜色 |
方法
| 方法 | 说明 |
|---|---|
set(tbl) | 批量设置属性 |
示例
local curved = lvgl.CurvedLabel(nil, {
w = 200, h = 100,
text = "HELLO WORLD",
radius = 120,
angle_start = 150,
angle_range = 200,
text_color = lvgl.Color(0x00FFAA),
})社区补充(洛汐文档库)
洛汐文档库记录的 CurvedLabel 属性为 text、radius、angle_start、angle_range、font、text_color(均见上),无专用方法,其余沿用 Object 通用属性与方法。
参考来源:官方 docs-lua / 洛汐文档库