Drawing::rectangle()
Draws a filled rectangle centred on (x,y).
Examples
Syntax
Java
.rectangle(x, y, width, height, color)
Parameters
| Name | Data Type | Description |
|---|---|---|
| x | double | centre x |
| y | double | centre y |
| width | double | width in pixels |
| height | double | height in pixels |
| color | Color | fill colour |
Return
void