mask()

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!

관련 레퍼런스