DrawCommand

sealed interface DrawCommand(source)

A retained drawing command in accumulated tree coordinates.

Commands are returned in retained paint order, including explicit nested child clips and post-child overlays. A backend must execute the list in that order. Backends must intersect drawing with every active PushClip until the matching PopClip. The core does not define blending or sampling policy. Portable commands carry platform-neutral values, while the opt-in Platform variant preserves an opaque version-adapter payload without teaching core its type.

Inheritors

Types

Link copied to clipboard
data class BlitImage(val image: DrawImage, val source: IntRect, val destination: IntRect) : DrawCommand

Copies an image source rectangle into a tree-coordinate destination rectangle.

Link copied to clipboard
data class FillRectangle(val bounds: IntRect, val color: ArgbColor) : DrawCommand

Fills a rectangle with one color.

Link copied to clipboard
data class Platform(val command: PlatformDrawCommand, val bounds: IntRect) : DrawCommand

Preserves an opaque platform payload at one tree-coordinate rectangle.

Link copied to clipboard
data object PopClip : DrawCommand

Ends the most recently begun child clip.

Link copied to clipboard
data class PushClip(val bounds: IntRect) : DrawCommand

Begins clipping subsequent drawing to bounds intersected with every active outer clip.