Class AnsiCellWriter
Writes the difference between two cell grids as escape sequences: a cursor move to each run of changed cells, a color change where the colors change, and the text. The bytes gather in one buffer that is reused between frames.
Assembly: DarkEffekt.Terminal.UI
Section titled “Assembly: DarkEffekt.Terminal.UI”public sealed class AnsiCellWriterProperties
Section titled “Properties”Length
Section titled “Length”public int Length { get; }Methods
Section titled “Methods”Reset()
Section titled “Reset()”public void Reset()ToArray()
Section titled “ToArray()”The bytes gathered since Reset, as an array of their own.
public byte[] ToArray()Returns
Section titled “Returns”System.Byte[]
Ascii(string)
Section titled “Ascii(string)”public void Ascii(string text)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
text |
Diff(CellSurface, CellSurface, bool)
Section titled “Diff(CellSurface, CellSurface, bool)”Appends what turns the shown grid into the next one. With
everything, writes every cell. The grids must be
the same size.
public void Diff(CellSurface shown, CellSurface next, bool everything)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.CellSurface | shown |
| DarkEffekt.Terminal.CellSurface | next |
System.Boolean |
everything |