An atlas's art as stored kitty images, transmitted once and placed many times.
Drafter.Compositor.write_raw(Cauldron2D.Drafter.Sprites.transmit(:my_game))Every frame of every art in the atlas gets a stable image id from image_id/3, so a
surface can place it by id on any later frame without sending pixels again. Transmit
once per session, and again after anything that empties the terminal's image store or
changes the atlas.
Summary
Functions
The kitty image id under which the first frame of art of atlas is stored; the same on every call.
The kitty image id of the frame of art showing at at_ms.
The kitty image id of text drawn in colour at scale by Linocut.Font, the same on every call.
The bytes that store text drawn in colour at scale under its label_id/4.
raster at {width, height} pixels, each output pixel the nearest source pixel; the
raster itself at its own size or with nil.
The bytes that store every frame of every art of atlas in the terminal, without
displaying any.
Functions
@spec image_id(Cauldron2D.Atlas.name() | Cauldron2D.Atlas.t(), Cauldron2D.Atlas.art()) :: pos_integer()
The kitty image id under which the first frame of art of atlas is stored; the same on every call.
@spec image_id( Cauldron2D.Atlas.name() | Cauldron2D.Atlas.t(), Cauldron2D.Atlas.art(), integer() ) :: pos_integer()
The kitty image id of the frame of art showing at at_ms.
@spec label_id( Cauldron2D.Atlas.name() | Cauldron2D.Atlas.t(), String.t(), Cauldron2D.Atlas.rgb(), pos_integer() ) :: pos_integer()
The kitty image id of text drawn in colour at scale by Linocut.Font, the same on every call.
@spec label_transmit( Cauldron2D.Atlas.name() | Cauldron2D.Atlas.t(), String.t(), Cauldron2D.Atlas.rgb(), pos_integer(), keyword() ) :: iodata()
The bytes that store text drawn in colour at scale under its label_id/4.
@spec resampled(FrenchCurve.Raster.t(), {pos_integer(), pos_integer()} | nil) :: FrenchCurve.Raster.t()
raster at {width, height} pixels, each output pixel the nearest source pixel; the
raster itself at its own size or with nil.
@spec transmit(Cauldron2D.Atlas.name() | Cauldron2D.Atlas.t(), keyword()) :: iodata()
The bytes that store every frame of every art of atlas in the terminal, without
displaying any.
Options
:size—{width, height}in pixels to store each sprite at, resampled nearest-neighbour once here, so a placement of that size is drawn pixel for pixel and the terminal scales nothing. Default: the sprite's own size:compress— zlib each transmit. Defaulttrue