Struct Cell
One cell of a ScreenBuffer: a single glyph plus the
foreground / background / attributes the diff renderer should paint
it with. Value-equality so cell-by-cell diffing is a straight
==.
public readonly record struct Cell : IEquatable<Cell>
- Implements
- Inherited Members
Remarks
Glyph is a single 16-bit char — surrogate pairs and wide East-Asian glyphs are not modeled in v1; one cell == one column. The name leaves room for a later grapheme-cluster representation without renaming the field.
Use Empty as the default-fill for an unwritten buffer: space on light-gray-on-black, the closest analogue of an empty terminal row.
Constructors
Cell(char, Color, Color, CellAttrs)
One cell of a ScreenBuffer: a single glyph plus the
foreground / background / attributes the diff renderer should paint
it with. Value-equality so cell-by-cell diffing is a straight
==.
public Cell(char Glyph, Color Fg, Color Bg, CellAttrs Attrs = CellAttrs.None)
Parameters
Remarks
Glyph is a single 16-bit char — surrogate pairs and wide East-Asian glyphs are not modeled in v1; one cell == one column. The name leaves room for a later grapheme-cluster representation without renaming the field.
Use Empty as the default-fill for an unwritten buffer: space on light-gray-on-black, the closest analogue of an empty terminal row.
Fields
Empty
Default empty cell — ASCII space on the classic DOS palette (LightGray on Black). Use this as the fill for a freshly created buffer.
public static readonly Cell Empty
Field Value
Properties
Attrs
public CellAttrs Attrs { get; init; }
Property Value
Bg
public Color Bg { get; init; }
Property Value
Fg
public Color Fg { get; init; }
Property Value
Glyph
public char Glyph { get; init; }