Name
CropBrush -- crop a brush (V2.0)
Synopsis
CropBrush(id, x, y, width, height)
Function
This function crops the brush specified by id at the position specified by x and y to the new dimension specified by width and height. If the brush has a mask and/or an alpha channel, they will be cropped as well.

Inputs
id
brush to crop
x
x-position where to start cropping
y
y-position where to start cropping
width
crop width
height
crop height
Example
CreateBrush(1, 200, 200)
SelectBrush(1)
Circle(50, 50, 50, #RED)
EndSelect

CropBrush(1, 50, 50, 101, 101)
DisplayBrush(1, #CENTER, #CENTER)
Creates a new brush and draws a red circle in the center of it. After that, the empty area surrounding the circle will be cropped.

Show TOC