KgpCellData
Namespace: Hex1b
Assembly: Hex1b.dll
Immutable data for a KGP (Kitty Graphics Protocol) image placement on a surface cell.
public sealed class KgpCellDataInheritance
Object → KgpCellData
Properties
ClipH
Gets the pixel height of the visible source region (0 = full height).
Returns: Int32
public int ClipH { get; }ClipW
Gets the pixel width of the visible source region (0 = full width).
Returns: Int32
public int ClipW { get; }ClipX
Gets the pixel X offset into the source image for clipping (0 = no clip).
Returns: Int32
public int ClipX { get; }ClipY
Gets the pixel Y offset into the source image for clipping (0 = no clip).
Returns: Int32
public int ClipY { get; }HeightInCells
Gets the height of the placement in terminal rows.
Returns: Int32
public int HeightInCells { get; }ImageId
Gets the KGP image ID for placement commands.
Returns: UInt32
public uint ImageId { get; }IsClipped
Gets whether this placement has a source rectangle clip applied.
Returns: Boolean
public bool IsClipped { get; }Payload
Gets the complete payload for emission: transmit (if needed) + placement. For legacy/opaque payloads (SourcePixelWidth == 0), returns TransmitPayload as-is.
Returns: String
public string Payload { get; }SourcePixelHeight
Gets the source image height in pixels (for computing clip ratios).
Returns: UInt32
public uint SourcePixelHeight { get; }SourcePixelWidth
Gets the source image width in pixels (for computing clip ratios).
Returns: UInt32
public uint SourcePixelWidth { get; }TransmitPayload
Gets the transmit payload (a=t with image data), or null if the image was already transmitted (cache hit → use a=p only).
Returns: String
public string? TransmitPayload { get; }WidthInCells
Gets the width of the placement in terminal columns.
Returns: Int32
public int WidthInCells { get; }ZIndex
Gets the z-index for KGP placement stacking order relative to text. Negative values render behind text, positive values render on top of text.
Returns: Int32
public int ZIndex { get; }Remarks
Stores structured placement parameters so that clipping can adjust the source rectangle without re-encoding the image data. The transmit payload (a=t) is stored separately from the placement parameters so that the placement command (a=p) can be regenerated with different source rectangles after compositing clips.