Which pixels of a picture are solid, one bit each.
bits holds height rows, each padded to whole bytes, the leftmost pixel of a byte
in its high bit.
mask = Cauldron2D.Mask.from_raster(raster)
Cauldron2D.Mask.set?(mask, {3, 7})
Summary
Functions
The mask of raster's pixels whose alpha is at least threshold (default 1).
A mask from rows of bits as described above.
Whether pixel {x, y} is solid; pixels outside the mask are not.
Types
@type t() :: %Cauldron2D.Mask{ bits: binary(), height: pos_integer(), width: pos_integer() }
Functions
@spec from_raster(FrenchCurve.Raster.t(), 1..255) :: t()
The mask of raster's pixels whose alpha is at least threshold (default 1).
@spec new(pos_integer(), pos_integer(), binary()) :: t()
A mask from rows of bits as described above.
Whether pixel {x, y} is solid; pixels outside the mask are not.