Lua 应用开发LVGL全局函数与常量全局函数

PCT

百分比换算

定义

PCT(x: number) -> integer

将数值转换为相对父对象尺寸的百分比值。

示例

local w = lvgl.PCT(80)  -- 父对象宽度的 80%

大纲