我现在将源码修改了下,屏蔽了绘制矩形轮廓等,仅绘制矩形背景,背景色为白色。此时周期刷新函数会调用draw_bg函数进行绘制。 LV_ATTRIBUTE_FAST_MEMstaticvoiddraw_bg(constlv_area_t*coords,constlv_area_t*clip,constlv_draw_rect_dsc_t*dsc){。。。// mask数据准备,为每一行准备maskfor(h=draw_area.y1;h<...
LV_ATTRIBUTE_FAST_MEM static void draw_bg(const lv_area_t * coords, const lv_area_t * clip, const lv_draw_rect_dsc_t * dsc); LV_ATTRIBUTE_FAST_MEM static void draw_border(const lv_area_t * coords, const lv_area_t * clip, ...
在注册显示驱动的时候调用了lv_disp_drv_init函数,其中又调用了对驱动的draw_ctx_init成员的初始化赋值,即lv_draw_sw_init_ctx,而lv_draw_sw_init_ctx中对一些重复的基础性的绘制函数指针进行了赋值,比如圆弧绘制draw_arc为lv_draw_sw_arc,矩形绘制draw_rect为lv_draw_sw_rect,此外还有背景绘制、字符绘制、图...
lv_refr_area_part里面是绘图,lv_obj_event_base中的 base->event_cb(obj, e);就是lv_obj_event_cb函数,lv_obj_event_cb传入参数LV_EVENT_DRAW_MAIN则调用函数lv_obj_draw函数,包括lv_draw_rect,最后调用_lv_blend_fill->fill_normal->lv_color_fill里面填充区域。 /*Create a temp. disp_buf which...
The call process of lv_draw_sw_rect is as follows:The program stuck in vg_lite_finish() in the function lv_event_send(obj, LV_EVENT_DRAW_MAIN, draw_ctx) rather than every time vg_lite_finish() is called in other place. Then, I tested by disabling LV_DRAW_COMPLEX or L...
整个过程中使用了绘制矩形(lv_draw_rect)、绘制线条(lv_draw_line)机制等。矩形图代表瞬时的频谱强度,线条用于代表频谱峰值的滞后响应,由于线条的宽度是2 像素,所以看起来也是一个小长方体。它通过循环遍历一个大小为频谱分析结果数据SAMPLE_SIZE的数组,绘制矩形和两条线条,其中bar_chart和bar_chart_peaks是用于...
通过lv_disp_draw_buf_t变量初始化,如下所示: /* Example for 1) */static lv_disp_draw_buf_t draw_buf_dsc_1; static lv_color_t buf_1[MY_DISP_HOR_RES * 10];/*A buffer for 10 rows*/lv_disp_draw_buf_init(&draw_buf_dsc_1, buf_1, NULL, MY_DISP_HOR_RES *10);/*Initialize ...
绘图实际发生在LV_EVENT_DRAW_POST(绘图结束后)事件,会对频谱对象进行绘制操作。整个过程中使用了绘制矩形(lv_draw_rect)、绘制线条(lv_draw_line)机制等。矩形图代表瞬时的频谱强度,线条用于代表频谱峰值的滞后响应,由于线条的宽度是2 像素,所以看起来也是一个小长方体。它通过循环遍历一个大小为频谱分析结果数据...
}voiddrawRect (intx0,inty0,intwidth,intheight,intcolor) {switch(vinfo.bits_per_pixel) {case32: drawRect_rgb32 (x0, y0, width, height, color);break;case16: drawRect_rgb16 (x0, y0, width, height, color);break;case15: drawRect_rgb15 (x0, y0, width, height, color);break;defa...
drawPixel(int32_t x, int32_t y, uint32_t color) // Plotting individual pixel pointsdrawLine(int32_t xs, int32_t ys, int32_t xe, int32_t ye, uint32_t color) // Draw a linedrawRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color) // Draw a rectangle...