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

Parameter | Description
--- | ---
`x` | Crop x coordinate.
`y` | Crop y coordinate.
`width` | Crop width.
`height` | Crop height.

Example

    icon.crop(0, 0, 16, 16)
    assert icon.width == 16
    assert icon.height == 16