Paints a placed element tree into a Tuix.Buffer and serializes frames
(or frame diffs) into ANSI iodata.
Summary
Functions
Paints a placed tree into a buffer.
Renders an element tree at the given size: layout + paint.
Serializes the difference between two frames as ANSI iodata.
Functions
@spec paint(Tuix.Layout.Placed.t(), Tuix.Buffer.t()) :: Tuix.Buffer.t()
Paints a placed tree into a buffer.
@spec render(Tuix.Element.t(), pos_integer(), pos_integer()) :: Tuix.Buffer.t()
Renders an element tree at the given size: layout + paint.
@spec to_iodata(Tuix.Buffer.t(), Tuix.Buffer.t() | nil) :: iodata()
Serializes the difference between two frames as ANSI iodata.
With old as nil, serializes the full frame (preceded by a clear).
Rows whose contents are unchanged are skipped with a single term comparison. Within a changed row, consecutive changed cells are emitted as runs (one cursor move per run), in a single pass over the row.