Hi there!
Building up on a great post from the old forum: https://forum.processing.org/two/discussion/comment/77997/#Comment_77997
shape. masking with PGraphics — was wondering if some one can give me a tip to how to add mouseX and mouseY to the masked shape? Was trying the following, but it seems that needs a bit more work.
PImage img; // Declare variable "a" of type PImage
PGraphics maskImage;
void setup() {
size(800,600);
img = loadImage("MyImage_1.jpg");
// Create mask
maskImage = createGraphics(width,height);
maskImage.beginDraw();
maskImage.rect(mouseX,mouseY, 300, 200);
maskImage.endDraw();
img.mask(maskImage);
}
Many thanks in advance!