Package-level declarations

Types

Link copied to clipboard
sealed interface HeadlessFrame

An immutable, thread-safe result of one synchronous headless render.

Link copied to clipboard
sealed interface HeadlessImage

An immutable, thread-safe row-major physical ARGB image produced by headless rendering.

Functions

Link copied to clipboard
fun rasterizeHeadless(commands: List<DrawCommand>, viewport: IntSize, scale: Int = 1): HeadlessImage

Rasterizes ordered portable commands into an immutable physical ARGB image.

Link copied to clipboard
fun rasterizeHeadlessInto(commands: List<DrawCommand>, bounds: IntRect, scale: Int, pixels: IntArray)

Rasterizes an original-coordinate region into borrowed caller-owned ARGB storage for synchronous native upload. Materializes the transparent background lazily and writes only the checked physical region prefix; excess capacity remains untouched. Every output pixel is initialized before use, including empty commands and clipped primitives. The caller exclusively owns pixels throughout this call, and no image, command, array or callback is retained. Preflight rejects invalid input before any storage changes. Pixel arithmetic follows rasterizeHeadlessRegion.

Link copied to clipboard

Rasterizes a nonnegative logical region for runtime presentation without translating source-sampling coordinates. Output storage contains only the checked physical extent of bounds; ordered commands retain their original coordinates. Validation, clip balance, exact Float sampling and pixel composition follow rasterizeHeadless. No commands, pixels or region history are retained after the returned immutable image is released.

Link copied to clipboard
fun renderHeadless(description: Element, viewport: IntSize, scale: Int = 1): HeadlessFrame

Synchronously renders an element description through the retained core and rasterizes its paint output.