public method crop(x as Int, y as Int, width as Int, height as Int) as Void:
Crops the image to the specified rectangle.
| Parameter | Description |
|---|---|
x | The x-coordinate of the rectangle. |
y | The y-coordinate of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
image = new Image()
image.load("image.png")
image.crop(0, 0, 100, 100)