DrawImage

sealed interface DrawImage(source)

An immutable, thread-safe source image for platform-neutral draw commands.

Pixels are row-major straight, non-premultiplied 0xAARRGGBB values. Implementations own their storage and expose neither a mutable array nor a public construction surface.

Properties

Link copied to clipboard
abstract val size: IntSize

The image extent in source pixel coordinates.

Functions

Link copied to clipboard
abstract fun argbAt(x: Int, y: Int): Int

Reads one source pixel without changing the image.

Link copied to clipboard
abstract fun copyArgb(): IntArray

Returns a fresh row-major copy of every source pixel.