Canvas::drawRectangle()
Browser availability: desktop-only.
This API requires the desktop runtime. Browser declarations may report the limitation without performing the operation.
A filled rectangle centred on a point.
Syntax
Java
.drawRectangle(x, y, width, height, fill)
Parameters
| Name | Data Type | Description |
|---|---|---|
| x | double | x of its centre |
| y | double | y of its centre |
| width | double | its width |
| height | double | its height |
| fill | Color | its colour |
Return
void