Masks part of the image with another.
img.mask()
uses another p5.Image object's alpha channel as the alpha channel for this image. Masks are cumulative and can't be removed once applied. If the mask has a different pixel density from this image, the mask will be scaled.
示例
语法
mask(srcImage)
参数
srcImage
p5.Image:
source image.
Notice any errors or typos? Please let us know. Please feel free to edit src/image/p5.Image.js and open a pull request!