WriteBrushPixel -- write single pixel to brush (V5.0)
WriteBrushPixel(id, x, y, color[, trans])
This command writes the specified RGB color to the brush passed in id at the position specified in the first two arguments. If the optional argument trans is specified and the brush has a mask or an alpha channel, then the value specified in the optional argument is written to the transparency channel of the brush. If the brush has a mask, trans may be set to 0 or 1, and if the brush has an alpha channel, then trans must be in the range of 0 to 255.

You can also write pixels to brushes by selecting the brush as the output device using SelectBrush() and then call the Plot() function. Using WriteBrushPixel(), however, is faster for most cases because it allows you to modify color and transparency channels at the same time and you can also avoid the overhead that is generated by calling SelectBrush() and EndSelect().

Note that when id specifies a palette brush, color must not be an RGB color but a pen value.

identifier of the brush to use
x offset
y offset
RGB color or pen to write to brush
optional: value to copy to the transparency channel
WriteBrushPixel(1, 100, 100, #RED)
Plots a red pixel at position 100:100 in brush 1.

Show TOC