klyn.gui.images.Image.crop
method
public method crop(x as Int, y as Int, width as Int, height as Int) as Void:
Description

Crops the image to the specified rectangle.

Parameters
ParameterDescription
xThe x-coordinate of the rectangle.
yThe y-coordinate of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
Example
image = new Image()
image.load("image.png")
image.crop(0, 0, 100, 100)