Name
CreateBorderBrush -- make border brush from brush (V5.0)
Synopsis
[id] = CreateBorderBrush(id, src, color[, size])
Function
This command creates a border from the brush specified in src and copies that border to a new brush that is specified in id. If id is set to Nil, CreateBorderBrush() will automatically choose an identifier that is vacant and return it to you. If id is not Nil, there will be no return value. The color argument must be set to the color that the border shall be drawn in. This must be a color in ARGB notation so you can also use a transparency setting here. Finally, the optional argument size can be used to specify the drop shadow's size.

Note that the size argument does not specify absolute width or height values but a relative factor by which the source brush will be grown on each side. This means that the border brush's width will be the source brush's width plus two times size, and the same applies to the border's height.

Inputs
id
identifier for the new border brush or Nil for auto id selection
src
the brush whose border shall be generated
color
desired border color as an ARGB value
size
optional: desired border size (defaults to 5)
Results
id
optional: identifier of the border brush; will only be returned when you pass Nil as argument 1 (see above)
Example
bordersize = 20
CreateBrush(1, 320, 240, #RED)
CreateBorderBrush(2, 1, #BLACK, bordersize)
DisplayBrush(2, 0, 0)
DisplayBrush(1, bordersize, bordersize)
The code above creates a border for a 320x240 red rectangle and displays it beneath it.

Show TOC