How can I make background color fill all screen except a portion of it (To be transparent)?
a
How can I make background color fill all screen except a portion of it (To be transparent)?
1
j
You can make a canvas, draw a rect full screen then draw the center rect with
BlendMode.Clear
. To make it work you have to set
.graphicsLayer(alpha = 0.99f)
otherwise the center rect will be black instead of transparent.
Alternatively you could draw four rects surrounding your inner empty space 🤷
a
Thanks @Jonas but did you know How can I put the rect at the center of canvas?
message has been deleted
I did it , Thanks Jonas ❤️
j
👍