Canvas::drawPolygon()
Browser availability: desktop-only.
This API requires the desktop runtime. Browser declarations may report the limitation without performing the operation.
A filled polygon, concave ones included.
Syntax
Java
.drawPolygon(xs, ys, fill)
Parameters
| Name | Data Type | Description |
|---|---|---|
| xs | double[] | x of every corner |
| ys | double[] | y of every corner, in the same order |
| fill | Color | its colour |
Return
void