Does anybody know if there’s a way to force a compositing layer for a composable without a hack like setting alpha to 99%?
a
Arkadii Ivanov
06/14/2021, 1:58 PM
What are you trying to achieve?
r
Richard Z
06/14/2021, 1:58 PM
I’m trying to use Canvas to create a custom drawing, and I use both drawing and “erasing” commands for this, but I don’t want to erase things outside the Canvas
In this screenshot, the Canvas is the dark overlay with the light blue outline and the clear area in the middle.
I achieve it by:
• Draw a translucent black rect
• Draw the round image with a blue tint at slightly larger scale
• Draw the round image again at slightly smaller scale with DstOut blend mode
It works in this screenshot because I’m using graphicsLayer(alpha = .99f)
But from a framework perspective, I think there should be a less hacky solution