Name
ExtendBrush -- enlarge a brush (V10.0)
Synopsis
ExtendBrush(id, left, top, right, bottom[, t])
Function
This function enlarges the brush specified by id. You can specify the desired extension for all sides of the brush by passing a pixel value in the left, top, right and bottom parameters. A value of 0 means no extension on that side. Note that the extension values mustn't be negative. If you want to crop a brush, use the CropBrush() function instead.

The optional table argument can be used to specify the following additional options:

Clear:
If the brush uses transparency, you can set this tag to True if you want the newly allocated areas of the brush to be transparent as well. If you set this tag to False, the new areas will be opaque. Defaults to False.

Color:
This tag can be used to specify the filling color for the newly allocated areas of the brush. This is only used for RGB brushes. For palette brushes, use the Pen tag instead (see below). Defaults to #BLACK.

Pen:
This tag can be used to specify the filling pen for the newly allocated areas of the brush. This is only used for palette brushes. For RGB brushes, use the Color tag instead (see above). Defaults to 0.

Inputs
id
brush to enlarge
left
number of pixels to add on the left side
top
number of pixels to add on the top side
right
number of pixels to add on the right side
bottom
number of pixels to add on the bottom side
t
optional: table specifying further options (see above)
Example
CreateBrush(1, 200, 200)
ExtendBrush(1, 50, 50, 50, 50, {Color = #RED})
The code above creates a 200x200 pixel brush and then adds a red border of 50 pixels around it.

Show TOC