Hi ,I’m using STM32F769-Disco , I want to activate the DMA2D accelerator .
So I need to implement this two functions : static void my_mem_fill_cb(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, const lv_area_t * dest_area, const lv_area_t * fill_area, lv_color_t color)
Thanks !
But I get an error in mem_fill_cb() function :
lv_color_t * dest_buf_ofs = dest_buf;
Error :
**incompatible types when initializing type ‘lv_color_t *** {aka union *}’ using type ‘lv_color_t {aka union }’ tft.c /stm32f769_discovery_no_os/hal_stm_lvgl/tft line 150 C/C++ Problem
OK thanks.
I’m trying to invoke gpu_mem_blend_cb() function for blending two images or rendering anti-aliased fonts … But always gpu_mem_fill_cb() is invoked not mem_blend().
This is my implementation :
To try blending function I thinked simply create two images one after the other, the first is JPG format and the second PNG format (256 Indexed color format). But blending operation dosen’t work and the display is normally filled.
understanded ! Otherwise did you have an example to test gpu_mem_blend_cb () function ? because my goal is using DMA2D blending feature using LittlevGL blending function !
and thanks for helping @embeddedt
yes I set the opacity of the second image by : lv_obj_set_opa_scale(img1,LV_OPA_TRANSP);
and tried other alpha values but there is no diffrence --> I don’t see any transparency changes !
This is the portion of the main code :
You made the bottom image transparent. That isn’t going to do what you want. You need to make the top image slightly transparent, so that you actually blend two images.
Blending is only done when you can see through one image into another one. With the current setup you’ve described you won’t be able to see the bottom image, so there is no need to blend.
You need to set partial alpha on img2, because it is drawn on top. If you set full alpha LittlevGL is smart enough to not render a fully transparent image and no blending will occur.