Hello,
I am working on a project to build the sweater model and I have the functionality to add an image to mask the image in the sweater. I’m using contours for this. I want to change the color of only the contoured part, but the problem appears there.
p5.beginShape();
p5.vertex(0, 0);
p5.vertex(p5.width, 0);
p5.vertex(p5.width, p5.height);
p5.vertex(0, p5.height);
p5.beginContour();
p5.fill(255,0,0);
// sweater model herep5.endContour();
p5.endShape(p5.CLOSE);
The issue is that when I give fill
, it gives color to the whole canvas, but I just want to have color in the contour part.
Is it possible to do so?