Skip to content

GraphicMetadata

Defined in: src/render/buffer.ts:20

An inline image/SVG attached to a cell, rendered per the backend’s graphics protocol.

cellHeight: number

Defined in: src/render/buffer.ts:35

Height of the image in cells.


cellWidth: number

Defined in: src/render/buffer.ts:33

Width of the image in cells.


optional pixelBuffer?: Uint8Array<ArrayBufferLike>

Defined in: src/render/buffer.ts:27

Rasterized RGBA pixels for the terminal graphics protocols. Absent for a vector graphic that the web/canvas backend rasterizes natively from svg.


optional pixelHeight?: number

Defined in: src/render/buffer.ts:31

Pixel height of the rasterized buffer.


optional pixelWidth?: number

Defined in: src/render/buffer.ts:29

Pixel width of the rasterized buffer.


optional pngBase64?: string

Defined in: src/render/buffer.ts:37

Base64 PNG, used by protocols/backends that accept encoded images.


optional svg?: string

Defined in: src/render/buffer.ts:43

Raw SVG markup for native vector rendering on the canvas backend ($theme tokens already resolved). When set, the canvas draws this directly — crisp at the device pixel ratio — and the terminal pixel fields can be omitted.


type: "image"

Defined in: src/render/buffer.ts:22

Discriminant — currently always "image".


optional zIndex?: number

Defined in: src/render/buffer.ts:45

Stacking order against other graphics.