LVGL的原点位置在屏幕左上角,坐标系为LCD坐标系,更像是直角坐标系的第四象限。
一、布局
1、大小
设置大小(size)
//设置宽度:
lv_obj_set_width(obj, new_width);
//设置高度:
lv_obj_set_height(obj, new_height);
//同时设置宽度、高度:
lv_obj_set_size(obj, new_ width, new_ height);
获取大小(Get size)
//获取宽度:
lv_obj_get_width(obj);
//获取高度:
lv_obj_get_height(obj);
2、位置(Position)
//设置x轴方向的坐标位置:
lv_obj_set_x(obj, new_x);
//设置y轴方向的坐标位置:
lv_obj_set_y(obj, new_y);
//同时设置x、y坐