How to implement a button with straight clipped corners

What LVGL version are you using?

8.3

What do you want to achieve?

I’d like to have buttons with clipped straight corners, as in the following (drawn) example:

x8fR8VLdE8nJnetq

In the example the button has all four corners clipped, but in several instances I should be able to clip any arbitrary corner while leaving the rest as they would be normally.

I imagine it should be possible with masking but I’d like to ask for some guidance if possible.