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

Crops the logical SVG viewBox.

Rendering uses the provided rectangle as the active viewBox, while the source SVG file remains unchanged.

Parameters
ParameterDescription
xCrop x coordinate.
yCrop y coordinate.
widthCrop width.
heightCrop height.
Example
icon.crop(0, 0, 16, 16)
assert icon.width == 16
assert icon.height == 16