added class to cover parts of image that were already cropped

This commit is contained in:
Victor Giers
2021-01-08 22:42:17 +01:00
parent 175225f092
commit 9e990c12ed
3 changed files with 44 additions and 7 deletions

19
cover.pde Normal file
View File

@@ -0,0 +1,19 @@
class Cover {
PVector p1, p2, p3, p4;
PShape coverRect;
Cover(PVector p1_, PVector p2_, PVector p3_, PVector p4_) {
p1 = new PVector(p1_.x, p1_.y);
p2 = new PVector(p2_.x, p2_.y);
p3 = new PVector(p3_.x, p3_.y);
p4 = new PVector(p4_.x, p4_.y);
coverRect = createShape();
coverRect.beginShape();
coverRect.fill(0,200);
coverRect.noStroke();
coverRect.vertex(p1.x, p1.y);
coverRect.vertex(p2.x, p2.y);
coverRect.vertex(p3.x, p3.y);
coverRect.vertex(p4.x, p4.y);
coverRect.endShape(CLOSE);
}
}