SixelPlacement
Namespace: Hex1b
Assembly: Hex1b.dll
An anonymous Sixel raster placement anchored to a terminal cell position.
public sealed class SixelPlacementInheritance
Object → SixelPlacement
Properties
Column
The anchor column. Ordinary scrolling and margin operations never change this; only internal reflow machinery repositions it, when a wrapped line's anchor genuinely lands in a different column under the new width.
Returns: Int32
public int Column { get; }CreatedAt
When this placement was created.
Returns: DateTimeOffset
public DateTimeOffset CreatedAt { get; }HasPaintedExtent
true when this placement paints at least one cell. A graphic clipped entirely outside the scrolling region at creation time can have a zero-size painted crop while still occupying its declared cell span.
Returns: Boolean
public bool HasPaintedExtent { get; }HasVisiblePaintedCells
Gets whether this placement still has at least one painted cell that has not been destructively damaged.
Returns: Boolean
public bool HasVisiblePaintedCells { get; }HeightInCells
The unclipped occupied height, in cells, of the source geometry.
Returns: Int32
public int HeightInCells { get; }Image
The raster resource this placement projects: the authoritative decoded raster, or a geometry-only outcome when the rasterizer refused pixel allocation. Also carries this image's logical/rendered/declared/painted extents, creation-time , background mode, aspect state, stable content identity, and protocol diagnostics (see , , , and ).
Returns: SixelData
public SixelData Image { get; }IsGeometryOnly
true when the authoritative rasterizer could not produce pixels for this placement's image (a geometry-only outcome). Geometry-only placements are always retained, never silently dropped.
Returns: Boolean
public bool IsGeometryOnly { get; }PaintedBottom
Absolute bottom row (inclusive) of the painted/visible crop.
Returns: Int32
public int PaintedBottom { get; }PaintedColumnCount
Number of columns actually painted.
Returns: Int32
public int PaintedColumnCount { get; }PaintedColumnOffset
Column offset (relative to ) where the visible/painted crop begins.
Returns: Int32
public int PaintedColumnOffset { get; }PaintedLeft
Absolute left column of the painted/visible crop.
Returns: Int32
public int PaintedLeft { get; }PaintedRight
Absolute right column (inclusive) of the painted/visible crop.
Returns: Int32
public int PaintedRight { get; }PaintedRowCount
Number of rows actually painted: the visible crop clipped to the scrolling region/page bounds in effect when the placement was created.
Returns: Int32
public int PaintedRowCount { get; }PaintedRowOffset
Row offset (relative to ) where the visible/painted crop begins. Stored relative to the anchor so shifting during scrolling automatically keeps the crop consistent.
Returns: Int32
public int PaintedRowOffset { get; }PaintedTop
Absolute top row of the painted/visible crop.
Returns: Int32
public int PaintedTop { get; }Row
The anchor row (0-based, in the owning screen's local coordinate space). Mutable so scroll and history operations can shift it in place.
Returns: Int32
public int Row { get; }Sequence
Monotonic write sequence used to order overlapping placements (later sequence paints on top), and to disambiguate otherwise-identical placements created from the same content.
Returns: Int64
public long Sequence { get; }WidthInCells
The unclipped occupied width, in cells, of the source geometry (the anchor + occupied cell span the issue requires each placement to retain, independent of how much of it actually painted).
Returns: Int32
public int WidthInCells { get; }Methods
CoversCell(int, int)
Whether the painted/visible crop of this placement covers the given cell.
Parameters:
Returns: Boolean
public bool CoversCell(int row, int column)GetPaintedPixels()
Materializes exactly the pixels within this placement's painted/visible crop rectangle (// /), with damaged cells made transparent.
Returns: SixelPixelBuffer
The cropped pixel buffer, or null when the image has no decoded raster (geometry-only) or the painted crop is empty.
public SixelPixelBuffer? GetPaintedPixels()GetVisiblePixels()
Materializes this placement's pixels with damaged cells made transparent.
Returns: SixelPixelBuffer
public SixelPixelBuffer? GetVisiblePixels()IsCellDamaged(int, int)
Gets whether text has destructively overwritten this cell's pixels since the placement was created.
Parameters:
Returns: Boolean
public bool IsCellDamaged(int row, int column)Remarks
A placement's lifetime is completely independent of the screen buffer's character grid: overwriting the text cell the placement was anchored to does not release the placement or its underlying image. A placement is removed only when it stops being reachable from the graphics state that owns it (the active screen's live placements, or the main screen's history), mirroring the reachability-based lifetime model already used by instead of manual reference counting.
is mutable so scrolling and history transitions can shift a placement's anchor in place without discarding and recreating it (the same "shift, don't recreate" strategy uses). The declared footprint (/) is fixed at creation time, matching the Sixel protocol's write-once-then-anchor semantics: unlike KGP, Sixel never resizes an existing placement's declared geometry. The painted crop window (// /) may still shrink after creation via ClipToCellRectangle — always by intersecting the current painted rectangle with a new clip bound, so a row or column already cropped away can never resurface later regardless of operation order (scroll, resize, and history pruning all funnel through this same monotonic intersection). Internal recording replay may restore an already-captured crop and damage mask after recreating the raster through the normal parser. is likewise repositioned only via internal reflow machinery, used when an anchor's wrapped-line position genuinely moves horizontally; ordinary scrolling and margin operations never touch it.
This type deliberately omits KGP-only protocol concepts: no public image/placement IDs, no image-number addressing, no explicit delete selectors, no relative-placement graph, no Unicode placeholders, no z-index, and no chunked uploads. A placement's identity for automation purposes is its anchor position plus (for disambiguating overlapping placements created from identical content).
Whether a placement was captured from the live viewport or from scrollback history is derived, not stored: a placement whose falls below is a viewport placement, and one at or above it is a history placement — the same row-space unification uses for its text cell buffer.