Hi folks, I'm currently creating an open source UI design app (think Sketch/Figma), and I'm trying to implement "alpha masks". What would be the best way to do this with CanvasKit?
Here's an example of how it should work:
The alpha of each pixel of the "mask" should be assigned to the corresponding pixel of the "contents" to get the "masked contents". The r/g/b of the mask is discarded.
I'm currently calling `saveLayer` before drawing the contents. Is there a way to apply a filter containing the mask data to get this effect? This feels like a blending mode, but I'm not really sure. I'm using the canvaskit-wasm package from npm at the moment, but if it would simplify things to expose a different ImageFilter or something in a custom build, I could do that too.