WriteBrushPixel(id, x, y, color[, trans])
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.
WriteBrushPixel(1, 100, 100, #RED)Plots a red pixel at position 100:100 in brush 1.