rect

v0.1.7
rect(x, y, w, h);

Draw a rectangle on the screen.

Arguments

xThe x position of the rectangle
yThe y position of the rectangle
wThe width
hThe height

function setup()
  createWindow(200, 200);
end

function draw()
  background('purple');

 -- rectangle near the top-left corner
  rect(30, 30, 120, 80); 
end

Output

See rect in shapes.h