CreateBorderBrush -- make border brush from brush (V5.0)
[id] = CreateBorderBrush(id, src, color[, size])
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.

identifier for the new border brush or Nil for auto id selection
the brush whose border shall be generated
desired border color as an ARGB value
optional: desired border size (defaults to 5)
optional: identifier of the border brush; will only be returned when you pass Nil as argument 1 (see above)
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