Skip to content

SixelVisibility

Namespace: Hex1b.Surfaces

Assembly: Hex1b.dll

Tracks visibility information for a sixel during compositing.

csharp
public sealed class SixelVisibility

Inheritance

ObjectSixelVisibility

Constructors

SixelVisibility(TrackedObject<SixelData>, int, int, int)

Creates a new sixel visibility tracker.

Parameters:

  • sixel (TrackedObject<SixelData>):
  • anchorX (Int32):
  • anchorY (Int32):
  • layerIndex (Int32):
csharp
public SixelVisibility(TrackedObject<SixelData> sixel, int anchorX, int anchorY, int layerIndex)

Properties

AnchorPosition

Gets the anchor cell position (top-left of the sixel).

Returns: ValueTuple<Int32, Int32>

csharp
public (int X, int Y) AnchorPosition { get; }

IsFragmented

Gets whether this sixel is fragmented (partially occluded, multiple visible regions).

Returns: Boolean

csharp
public bool IsFragmented { get; }

IsFullyOccluded

Gets whether this sixel is fully occluded (not visible at all).

Returns: Boolean

csharp
public bool IsFullyOccluded { get; }

IsFullyVisible

Gets whether this sixel is fully visible (no occlusion).

Returns: Boolean

csharp
public bool IsFullyVisible { get; }

LayerIndex

Gets the layer index this sixel belongs to.

Returns: Int32

csharp
public int LayerIndex { get; }

Sixel

Gets the original sixel data.

Returns: TrackedObject<SixelData>

csharp
public TrackedObject<SixelData> Sixel { get; }

VisibleRegions

Gets the visible pixel regions after occlusion. Empty if fully occluded.

Returns: IReadOnlyList<PixelRect>

csharp
public IReadOnlyList<PixelRect> VisibleRegions { get; }

Methods

ApplyOcclusion(Rect, CellMetrics)

Applies an occlusion rectangle (in cell coordinates) to this sixel.

Parameters:

  • occlusionCellRect (Rect): The occluding rectangle in cell coordinates.
  • metrics (CellMetrics): Cell metrics for coordinate conversion.
csharp
public void ApplyOcclusion(Rect occlusionCellRect, CellMetrics metrics)

GenerateFragments(CellMetrics)

Generates fragments for the visible regions of this sixel.

Parameters:

  • metrics (CellMetrics): Cell metrics for position calculation.

Returns: IReadOnlyList<SixelFragment>

List of fragments to render.

csharp
public IReadOnlyList<SixelFragment> GenerateFragments(CellMetrics metrics)

Released under the MIT License.