Canvas::clip()
Browser availability: desktop-only.
This API requires the desktop runtime. Browser declarations may report the limitation without performing the operation.
Draws only inside a rectangle (axis-aligned on the screen) until noClip().
Syntax
Java
.clip(x, y, width, height)
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 |
Return
void