Help with mask object

In lvgl v7 I used objmask to hide parts of image. For this I create image with objmask as parent, then calc/update mask params. Wherein mask is a children of cont-object. And when I realign cont (change position), masked image moved with him. How to implement such logic in v8 lvgl? Objmask removed in v8. lv_draw_rect() must be drawn in certain coordinates and couldn’t be align to obects.

Any help appriciated.

I see people are discussing the same issue as you here

This topic about lvgl_9. I can’t understand how to implement this in lvgl_v8.

I have 2 png-images on top_layer & bottom_layer

text3762-10

Depending of battery charge I need to hide part of image on the top_layer. In lvgl v7 I just recaclculate params of lv_objmask associated with top image. + there are 4 such objects on the screen.

In lvgl v8 mask parameters are not attached to objects. And I can’t understand how-to solve a problem.

just found another way to solve your problem (i think), anyway the person in this video used an image and slider instead of using a mask like you.