GroupNode

Container node that groups other nodes and applies transforms

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Thread-safe snapshot of children for rendering and traversal. Updated atomically after Applier mutations complete (copy-on-write).

Link copied to clipboard

Dirty tracking for efficient rendering. Volatile to ensure visibility across threads (Applier vs Canvas draw).

Link copied to clipboard

Visibility flag

Link copied to clipboard

Unique identifier for this node. Uses a monotonically increasing atomic counter to guarantee collision-free IDs across the lifetime of the process, even under concurrent creation.

Link copied to clipboard
var onDirty: () -> Unit?

Callback invoked when dirty propagation reaches a root node (parent == null). Used by IsometricScene to trigger Canvas invalidation via Compose state.

Link copied to clipboard

Parent node in the tree

Link copied to clipboard

Local transform properties

Link copied to clipboard

Optional per-node render options override. When non-null, overrides the inherited render options for this node and its subtree. When null (default), inherits from the parent context.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun markClean()

Clear dirty flag (called after rendering)

Link copied to clipboard
fun markDirty()

Mark this node and all ancestors as dirty. When propagation reaches the root (no parent), invokes onDirty to trigger a Canvas redraw via Compose's snapshot system.

Link copied to clipboard
open override fun renderTo(output: MutableList<RenderCommand>, context: RenderContext)

Render this node and its children into the given accumulator list. Eliminates intermediate list allocations compared to a returning render() method.

Link copied to clipboard

Update the snapshot from the current mutable children list. Called by the Applier after structural mutations.