square()
Shape / 2D PrimitivesDescription
Draws a square to the screen.
Syntax
void square(float x, float y, float s)
Parameters
| Name | Type | Description |
|---|---|---|
| x | float | x-coordinate of the upper-left corner |
| y | float | y-coordinate of the upper-left corner |
| s | float | side length |
Returns
voidRelated
Under the Hood
From Processing.h:
void square(float x, float y, float s);
Under the Hood
From Processing.cpp:
void PApplet::square(float x,float y,float s){rect(x,y,s,s);}