[Dev7.0] [Bug] lv_canvas_fill_bg(...) when change color again, it can't change canvas' bg color


The first time, I fill a canvas to LV_COLOR_RED by

lv_canvas_fill_bg(canvas, LV_COLOR_RED, 255);

At this step, the canvas can display red.

For a while, I want to change to another color LV_COLOR_BLUE by

lv_canvas_fill_bg(canvas, LV_COLOR_BLUE, 255);

At this step, the canvas can’t change to blue.

Maybe in function lv_canvas_fill_bg(...) doesn’t have lv_obj_invalidate(...) ?

Thank you.

It does not have an lv_obj_invalidate at the end, which is probably an oversight. If you manually call lv_obj_invalidate afterwards, does it work properly?

Yes, when add lv_obj_invalidate(...) , it can rechange bg-color.

I’ve just added lv_obj_invalidate().
It was missing from some other functions too.

1 Like