rect(x, y, w, h);Draw a rectangle on the screen.
Arguments
xThe x position of the rectangleyThe y position of the rectanglewThe widthhThe heightfunction setup()
createWindow(200, 200);
end
function draw()
background('purple');
-- rectangle near the top-left corner
rect(30, 30, 120, 80);
endOutput