Skip to content

ComputedSurfaceLayer

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

A layer whose cells are computed dynamically based on layers below.

csharp
public record ComputedSurfaceLayer : SurfaceLayer, IEquatable<SurfaceLayer>, IEquatable<ComputedSurfaceLayer>

Inheritance

ObjectSurfaceLayerComputedSurfaceLayer

Implements

Constructors

ComputedSurfaceLayer(CellCompute)

A layer whose cells are computed dynamically based on layers below.

Parameters:

  • Compute (CellCompute): The delegate that computes each cell's value.
csharp
public ComputedSurfaceLayer(CellCompute Compute)

Properties

Compute

The delegate that computes each cell's value.

Returns: CellCompute

csharp
public CellCompute Compute { get; init; }

Remarks

The compute delegate is called for each cell during compositing. It receives a that provides access to cells from layers below, enabling effects like fog of war, tinting, drop shadows, and other compositing operations.

Computed layers are always sized to match the widget bounds and cannot have offsets (they cover the entire surface).

Released under the MIT License.