r = IsBrushEmpty(id)
id
has only invisible pixels,
in which case it can be considered "empty". If there are only invisible pixels in the
brush, True
is returned, False
otherwise.
Obviously, a brush can only be "empty" if it uses some kind of transparency, either a
mask or an alpha channel. If you call this function on a brush that has neither a
mask nor an alpha channel attached, the return value will always be False
.
True
if there are only invisible pixels in the brush, False
otherwiseCreateBrush(1, 100, 100, #RED, {Mask = True, Clear = True}) Print(IsBrushEmpty(1))The code above will print 1 because although the brush is filled with red pixels, none of them will be visible because the mask has all pixels set to invisible.