left, top = TrimBrush(id)
TrimBrush()
will return the number of columns
removed from the left side as well as the number of rows removed from
the top side of the brush. You can calculate the right/bottom trim values
on your own then.
CreateBrush(1, 640, 480, #BLACK, {Mask = True, Clear = True}) SelectBrush(1, #SELMODE_COMBO) SetFillStyle(#FILLCOLOR) Box(#CENTER, #CENTER, 100, 100, #RED) EndSelect TrimBrush(1)The code above will create a 640x480 brush, draw a 100x100 red rectangle to it and then trim it down to 100x100 because all borders are blank.