How to display a round picture,why the set "body.radius" style does not work?

I want to send a phiz
the phiz face is round, I don’t want to display the conner.
I try to set the “body.radius”,but it does’t work.
I also try to create a cont as img’s parent, set the “body.radius” of cont, it dose’t work too.

Please send a code sample to reproduce the issue as well as pictures of the current and desired behavior.

As far as I know, images in version 6.1 and below don’t directly support the use of body radius. Instead, you should convert the image using the LV_IMG_CF_TRUE_COLOR_ALPHA (True color alpha) format, and make the corners transparent using the image editor.

The drawing system has been rewritten in dev-7.0 to support more advanced masking of objects. In that version, if you enable style.body.corner_mask, the radius parameter should work the way you expect.

1 Like