How do you add two mask areas together?


How do you add two mask areas together. Right now it seem to only include the overlapping areas of the mask. I need to have two area or-ed together.

What MCU/Processor/Board and compiler are you using?

What LVGL version are you using?

What do you want to achieve?

Using the following code I’m trying to get two circles to show the text and button underneath the mask area. How can I do this?

What have you tried so far?

I have tried this code in the simulator.
If I change r1 and r2.init

r1.init(a, lv.RADIUS.CIRCLE, False)
r2.init(a, lv.RADIUS.CIRCLE, False)
This will block all of the screen.
r1.init(a, lv.RADIUS.CIRCLE, True)
r2.init(a, lv.RADIUS.CIRCLE, True)
This is the reverse of what I want. I can see to red circles on the screen.
I want two transparent circles.

Code to reproduce

# Initialize 

import imp, usys as sys
import display_driver
import lvgl as lv

# Create a button with a label 
lv.scr_act().set_style_local_bg_color(lv.obj.PART.MAIN, lv.STATE.DEFAULT, lv.color_hex3(0xf33))

om = lv.objmask(lv.scr_act(), None)
om.set_size(200, 200)
om.align(None, lv.ALIGN.CENTER, 0, 0)
label = lv.label(om, None)
label.set_text("This label will be masked out. See how it works.")
label.align(None, lv.ALIGN.IN_TOP_MID, 0, 20)

cont = lv.cont(om, None)
cont.set_size(180, 100)
cont.align(None, lv.ALIGN.IN_BOTTOM_MID, 0, -10)

btn = lv.btn(cont, None)
btn.align(None, lv.ALIGN.CENTER, 0, 0)
btn.set_style_local_value_str(lv.btn.PART.MAIN, lv.STATE.DEFAULT, "Button")


a.x1 = 0
a.y1 = 0
a.x2 = 100
a.y2 = 100
r1.init(a, lv.RADIUS.CIRCLE, False)


a2.x1 = 100
a2.y1 = 00
a2.x2 = 190
a2.y2 = 100
r2.init(a2, lv.RADIUS.CIRCLE, False)

## Screenshot and/or video
If possible, add screenshots and/or videos about the current state.

I want to have 2 circles side by side so it looks like you are looking through binoculars.