Description
What LVGL version are you using?
9.2.0
What do you want to achieve?
Copy data into lv_canvas, as could do in LVGL 8.x.x
The latest documentation for Canvas in v9.2.0 states:
An array of pixels can be copied to the canvas with lv_canvas_copy_buf(canvas, buffer_to_copy, x, y, width, height). The color format of the buffer and the canvas need to match
However, that is the function signature from v8.x.x and has now changed to:
lv_canvas_copy_buf(lv_obj_t * obj, const lv_area_t * canvas_area, lv_draw_buf_t * dest_buf, const lv_area_t * dest_area)
So the documentation is incorrect, but I am confused by the dest_buf
and dest_area
attributes. canvas.h states dest_buf is “pointer to a buffer to store the copied data”, but surely the canvas obj is the destination buffer to store the copied data? The usage in 8.x.x was to copy to the canvas (destination) from somewhere else (source), but this description appears to be the opposite?