Skip to content

SurfaceDiff ​

Namespace: Hex1b.Surfaces

Assembly: Hex1b.dll

Represents the difference between two surface states.

csharp
public sealed class SurfaceDiff

Inheritance ​

Object → SurfaceDiff

Properties ​

ChangedCells ​

Gets the list of changed cells.

Returns: IReadOnlyList<ChangedCell>

csharp
public IReadOnlyList<ChangedCell> ChangedCells { get; }

Count ​

Gets the number of changed cells.

Returns: Int32

csharp
public int Count { get; }

Empty ​

Creates an empty diff.

Returns: SurfaceDiff

csharp
public static SurfaceDiff Empty { get; }

IsEmpty ​

Gets whether the diff is empty (no changes).

Returns: Boolean

csharp
public bool IsEmpty { get; }

Remarks ​

A contains the list of cells that have changed between a previous and current surface state. This is used to generate minimal terminal update sequences.

Changed cells are stored in row-major order (sorted by Y, then X) for optimal cursor movement during rendering.

Released under the MIT License.