function setup() {
createCanvas(400, 300);
textSize(16);
}
function draw() {
clear();
fill("black");
text("The inside of the letter is cut"+
" out using a countour", 10, 20);
fill("yellow");
// Starting the shape using beginShape()
beginShape();
// Specifying all the vertices
// of the exterior shape
vertex(50, 50);
vertex(200, 50);
vertex(200, 200);
vertex(50, 200);
// Starting a contour
beginContour();
// Specifying all the vertices
// of the interior shape
// in counter-clockwise order
vertex(100, 175);
vertex(175, 175);
vertex(175, 75);
vertex(100, 75);
// Ending the contour
endContour();
// Ending the shape
endShape(CLOSE);
// Draw Circles for demonstration
// Red ones for exterior shape
fill("red");
circle(50, 50, 10);
circle(200, 50, 10);
circle(200, 200, 10);
circle(50, 200, 10);
fill("blue");
// Blue ones for interior shape
circle(100, 175, 10);
circle(175, 175, 10);
circle(175, 75, 10);
circle(100, 75, 10);
}