Skip to content
ConsoleMonster

API Reference

Class

FrameDiff

Namespace ConsoleMonster.Canvas
Assembly ConsoleMonster
Modifiers static

Computes the runs of cells that changed between two frames of the same size. Nearby runs are merged when the gap between them is small, because repositioning the cursor costs more bytes than rewriting a few cells. Runs never start or end inside a wide grapheme.

Inheritance

  • Object
  • FrameDiff

Methods

public static List<DiffRun> Compute(CellBuffer previous, CellBuffer current, Int32 mergeGap = 4) #
Returns: List<DiffRun>

Computes changed runs.

Parameters

previous ConsoleMonster.Canvas.CellBuffer requiredposition: 0
The frame currently on screen.
current ConsoleMonster.Canvas.CellBuffer requiredposition: 1
The new frame.
mergeGap System.Int32 = 4 optionalposition: 2
Unchanged cells allowed between two runs before they are split.

Returns

Runs in row-major order.