KetraTerm
API · DevelopmentAll versions

copyArgb

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.

Parameters

destination

caller-owned pixel array, requiring width × height entries after offset.

offset

first destination index; zero by default.

Throws

if offset is negative, exceeds the array size, or leaves fewer entries than the image's pixel count.