color, trans = ReadBrushPixel(id, x, y)
id. The color is returned in RGB format whereas the format of the
transvalue depends on the type of transparency used by the brush. If the brush has a mask,
transwill be either 0 (invisible) or 1 (visible). If the brush has an alpha channel, then
transwill be in the range of 0 (invisible) to 255 (visible). If the brush does not have a transparency channel, -1 is returned in
You can also read pixels from brushes by selecting the brush as the output device
using SelectBrush() and then call the ReadPixel() function. Using
however, is faster for most cases because it allows you to access color and transparency
channels at the same time and you can also avoid the overhead that is generated
by calling SelectBrush() and EndSelect().
color, trans = ReadBrushPixel(1, 100, 100)Reads pixel states from position 100:100 in brush 1.