Skip to content

SurfaceNode ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

Render node for . Renders layered surfaces with compositing.

csharp
public sealed class SurfaceNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → SurfaceNode

Properties ​

LayerBuilder ​

Gets or sets the layer builder function that creates the layers to composite.

Returns: Func<SurfaceLayerContext, SurfaceLayer>>

csharp
public Func<SurfaceLayerContext, IEnumerable<SurfaceLayer>>? LayerBuilder { get; set; }

Methods ​

GetChildren() ​

Gets the direct children of this node for structural tree traversal. Container nodes should override this to return their children.

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetChildren()

MeasureCore(Constraints) ​

Measures the size required for this surface.

Parameters:

  • constraints (Constraints): The size constraints for layout.

Returns: Size

The measured size based on size hints.

csharp
protected override Size MeasureCore(Constraints constraints)

Render(Hex1bRenderContext) ​

Renders the layered surfaces to the context.

Parameters:

csharp
public override void Render(Hex1bRenderContext context)

Remarks ​

SurfaceNode provides direct access to the Surface API, enabling arbitrary visualizations with multiple composited layers. Each layer can be a static surface, dynamically drawn content, or computed cells that can query layers below.

Layers are composited bottom-up in the order returned by the builder. The first layer is at the bottom, and subsequent layers are drawn on top.

Released under the MIT License.