Skija icon indicating copy to clipboard operation
Skija copied to clipboard

How to draw mask image in skija?

Open peter158 opened this issue 2 years ago • 2 comments

I want to draw the two pictures together to realize the function of picture mask, just like css style mask-image , So I want to know if any ways to use mask-image in skaji?

Looking forward to your reply thanks

peter158 avatar May 14 '22 12:05 peter158

Good question! I would look into ImageFilter::makeBlend, specifically one of

    /** Source trimmed inside destination. */
    SRC_IN,
    
    /** Destination trimmed by source. */
    DST_IN,

BlendModes

tonsky avatar May 16 '22 15:05 tonsky