必须创建一个对象组:lv_group_t * g = lv_group_create() 并且必须使用 lv_group_add_obj(g,...
canvas_style.line.color = LV_COLOR_BLACK; canvas_style.text.color = LV_COLOR_BLUE; //4.2 创建一个画布对象 lv_obj_t * canvas = lv_canvas_create(lv_scr_act(), NULL); //4.3 为画布设置一个缓冲区 lv_canvas_set_buffer(canvas, cbuf, CANVAS_WIDTH, CANVAS_HEIGHT, LV_IMG_CF_TRUE_COLOR...
lv_obj_t *canvas = lv_canvas_create(lv_screen_get_width(), lv_screen_get_height(), LV_OBJ_ACTIVE); // 创建一个点对象 lv_obj_t *point = lv_point_create(10, 20, LV_OBJ_ACTIVE); // 使用画点函数绘制点 lv_draw_point(point, 50, 50); // 刷新屏幕 lv_task_queue_draw(); //...
static lv_color_t cbuf[LV_CANVAS_BUF_SIZE_TRUE_COLOR(CANVAS_WIDTH, CANVAS_HEIGHT)]; static lv_style_t canvas_style; //4.1 画布样式配置 lv_style_copy(&canvas_style, &lv_style_plain); canvas_style.body.main_color = LV_COLOR_RED; canvas_style.body.grad_color = LV_COLOR_MAROON; canvas...
Bar (lv_bar) Button (lv_btn) Button matrix (lv_btnm) Calendar (lv_calendar) Canvas (lv_canvas) Checkbox (lv_cb) Chart (lv_chart) Container (lv_cont) Color picker (lv_cpicker) Drop-down list (lv_ddlist) Gauge (lv_gauge) Image (lv_img) Image button (lv_imgbtn) Keyboard (lv_kb...
lv_color_format_tims[]={LV_COLOR_FORMAT_I1,LV_COLOR_FORMAT_I2,LV_COLOR_FORMAT_I4,LV_COLOR_FORMAT_I8,LV_COLOR_FORMAT_L8};intpalette_sizes[]={2,4,16,256};for(intim=0;im<(sizeof(ims)/sizeof(*ims));im++) {lv_obj_t*canv=lv_canvas_create(lv_screen_active());lv_canvas_set_...
lv_obj_set_style_radius(appObj_canvas_p,0,LV_STATE_DEFAULT); lv_obj_set_style_outline_width(appObj_canvas_p,0,LV_STATE_DEFAULT); lv_obj_align(appObj_canvas_p, LV_ALIGN_TOP_MID,0,0);//CANVASlv_obj_t* appObjCamera = lv_canvas_create(appObj_canvas_p);//lv_scr_act()lv_obj_...
lua版本的lvgl已经做了大部分接口,并会不断地完善后续接口,总体来说,只要将原接口开头的lv_替换成lvgl.即可,但也有特例,比如不支持init方式创建组件,使用create来创建,还有字体设置以及lvgl符号等也有一些区别 常用概念# 布局# lvgl布局要有图层概念,这就引入了父对象子对象以及前后台概念 事件模型# LVGL中可使用...
program: https://github.com/mrQzs/CreateLvglLib LVGL Simulator program: https://github.com/mrQzs/Lvgl_Simulator support msvc 32/64 and mingw 32/64 Put the code file generated by lvglbuilder in the testcode folder Just load the source code and modify the resolution in the lvconf.h LVG...
lv_obj_set_style_bg_opa(mask_parent,LV_OPA_30,LV_STATE_DEFAULT); lv_obj_center(mask_parent); lv_obj_t* mask_p =lv_obj_create(mask_parent); lv_obj_set_size(mask_p,600,400); lv_obj_set_style_bg_color(mask_p,lv_color_hex(0xfffef9),LV_STATE_DEFAULT);//lv_obj_set_style_...