SetBrushTransparency()will scan through all pixels of the brush and mask out all pixels that have the specified color. The mask that is created by this function is not automatically updated when you call SelectBrush() to modify pixels of your brush. Hence, it is necessary to call
SetBrushTransparency()again after a call to SelectBrush(), so that the mask can be updated, too.
You can also use this function to remove a mask from a brush.
#NOTRANSPARENCY as the color.
#NOTRANSPARENCYto kill the brush's mask
CreateBrush(1, 320, 256) SelectBrush(1) SetFillStyle(#FILLCOLOR) Circle(0, 0, 100, #RED) EndSelect() SetBrushTransparency(1, #BLACK) MoveBrush(1, #CENTER, #BOTTOMOUT, #CENTER, #TOPOUT, 10)The above code creates a brush, draws a filled circle on it and then sets the background color black as transparent color. After that it scrolls the circle through the screen. It is important that you call
SetBrushTransparency()when output is done, i.e. after calling EndSelect().