Skip to content

SixelVisibility ​

Namespace: Hex1b.Surfaces

Assembly: Hex1b.dll

Tracks visibility information for a sixel during compositing.

csharp
public sealed class SixelVisibility

Inheritance ​

Object → SixelVisibility

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 image, using the protocol cell metrics captured when the image was created.

Parameters:

  • occlusionCellRect (Rect): The occluding rectangle in cell coordinates.
  • metrics (CellMetrics): Ignored. Sixel placement metrics are captured by .
csharp
[Obsolete("Cell metrics are captured by SixelData. Use ApplyOcclusion(Rect).")]
public void ApplyOcclusion(Rect occlusionCellRect, CellMetrics metrics)

ApplyOcclusion(Rect) ​

Applies an occlusion rectangle in cell coordinates to this Sixel image, using the protocol cell metrics captured when the image was created.

Parameters:

  • occlusionCellRect (Rect): The occluding rectangle in cell coordinates.
csharp
public void ApplyOcclusion(Rect occlusionCellRect)

GenerateFragments() ​

Generates fragments for the visible regions of this Sixel image using the protocol cell metrics captured when the image was created.

Returns: IReadOnlyList<SixelFragment>

List of fragments to render.

csharp
public IReadOnlyList<SixelFragment> GenerateFragments()

GenerateFragments(CellMetrics) ​

Generates fragments for the visible regions of this Sixel image using the protocol cell metrics captured when the image was created.

Parameters:

  • metrics (CellMetrics): Ignored. Sixel placement metrics are captured by .

Returns: IReadOnlyList<SixelFragment>

List of fragments to render.

csharp
[Obsolete("Cell metrics are captured by SixelData. Use GenerateFragments().")]
public IReadOnlyList<SixelFragment> GenerateFragments(CellMetrics metrics)

Released under the MIT License.