KetraTerm
API · DevelopmentAll versions

TerminalRenderImage

Immutable, retainable image resource. Unlike borrowed frames, this object may outlive a frame callback. Identity denotes a particular pixel version. Dimensions and pixels are immutable; source-retention metadata may change. Pixels are unassociated 8-bit sRGB ARGB; implementations never expose mutable storage.

Properties

Link copied to clipboard
abstract val height: Int

Positive height of the immutable pixel raster, in source pixels.

Link copied to clipboard

Whether the originating image store still retains this pixel version for future placements, including offscreen placements. Once false, it stays false; copyArgb, dimensions and pixels remain valid for existing consumers.

Link copied to clipboard
abstract val width: Int

Positive width of the immutable pixel raster, in source pixels.

Functions

Link copied to clipboard
abstract fun copyArgb(destination: IntArray, offset: Int = 0)

Copies all width × height row-major pixels into destination at offset. The destination needs that many entries after a nonnegative offset. Preparing a renderer raster once per resource identity avoids copying pixels every frame.