Table of Contents

Class CliRenderBuffer

Namespace
ItTiger.TigerCli.Rendering
Assembly
ItTiger.TigerCli.dll
Low-level dirty-cell console render buffer used by interactive rendering paths.
public class CliRenderBuffer
Inheritance
CliRenderBuffer
Inherited Members

Remarks

The buffer tracks changed cells and writes only dirty rows/cells to Console during Flush(). Most app code should render through ICliRenderSink and TigerConsole instead.

Constructors

CliRenderBuffer(int?, int?)

Creates a render buffer. Missing dimensions are resolved through safe terminal capability helpers, so allocation works under redirected or headless output.
public CliRenderBuffer(int? width, int? height)

Parameters

width int?
height int?

Properties

Height

The buffer height in console cells.
public int Height { get; }

Property Value

int

Width

The buffer width in console cells.
public int Width { get; }

Property Value

int

Methods

Flush()

Writes all dirty cells to the console and restores the previous console cursor and colours.
public void Flush()

Set(int, int, CliRenderCell)

Sets one buffer cell and marks it dirty.
public void Set(int x, int y, CliRenderCell cell)

Parameters

x int
y int
cell CliRenderCell

Set(int, int, char, ConsoleColor, ConsoleColor)

Sets one buffer cell and marks it dirty.
public void Set(int x, int y, char c, ConsoleColor fg, ConsoleColor bg)

Parameters

x int
y int
c char
fg ConsoleColor
bg ConsoleColor

Write(string, ConsoleColor, ConsoleColor)

Writes a string at the current console cursor, updating dirty cells as it advances.
public void Write(string s, ConsoleColor fg, ConsoleColor bg)

Parameters

s string
fg ConsoleColor
bg ConsoleColor