rect()
Shape / 2D PrimitivesDescription
Draws a rectangle to the screen. The fourth parameter can be a corner radius.
Syntax
void rect(float x, float y, float w, float h)
void rect(float x, float y, float w, float h, float r)
Parameters
| Name | Type | Description |
|---|---|---|
| x | float | x-coordinate of the upper-left corner |
| y | float | y-coordinate of the upper-left corner |
| w | float | width |
| h | float | height |
| r | float | corner radius (optional) |
Returns
voidRelated
Under the Hood
Implementation in Processing.h / Processing.cpp:
Loading...