Table of Contents

Method BuildAnsiForRegion

Namespace
Terminal.Gui.Drivers
Assembly
Terminal.Gui.dll

BuildAnsiForRegion(IOutputBuffer, int, int, int, int, StringBuilder, ref Attribute?, Func<int, int, bool>?, bool)

Builds ANSI escape sequences for the specified rectangular region of the buffer.

protected void BuildAnsiForRegion(IOutputBuffer buffer, int startRow, int endRow, int startCol, int endCol, StringBuilder output, ref Attribute? lastAttr, Func<int, int, bool>? includeCellPredicate = null, bool addNewlines = true)

Parameters

buffer IOutputBuffer

The output buffer to build ANSI for.

startRow int

The starting row (inclusive).

endRow int

The ending row (exclusive).

startCol int

The starting column (inclusive).

endCol int

The ending column (exclusive).

output StringBuilder

The StringBuilder to append ANSI sequences to.

lastAttr Attribute?

The last attribute used, for optimization.

includeCellPredicate Func<int, int, bool>

Predicate to determine which cells to include. If null, includes all cells.

addNewlines bool

Whether to add newlines between rows.