Cringe.Painter (cringe v0.1.0)

Copy Markdown View Source

Stateful terminal frame painter.

The painter returns ANSI iodata for changed lines only after the first frame.

Summary

Types

t()

@type t() :: %Cringe.Painter{
  height: pos_integer(),
  previous: [String.t()],
  width: pos_integer()
}

Functions

new(width, height)

@spec new(pos_integer(), pos_integer()) :: t()

render(painter, frame)

@spec render(t(), Cringe.Document.t() | Cringe.Frame.t()) :: {IO.chardata(), t()}