rect()Shape2D PrimitivesWeb & Applicationrect_.gif
rect(30, 20, 55, 55);
Draws a rectangle to the screen. A rectangle is a four-sided shape with every angle at ninety degrees. The first two parameters set the location, the third sets the width, and the fourth sets the height. The origin is changed with the rectMode() function.
rect(x, y, width, height);
int or float: x-coordinate of the rectangleint or float: y-coordinate of the rectangleint or float: width of the rectangleint or float: height of the rectangleNone
rectMode()
quad()
1.0FunctionCore