atContentPosition

fun Modifier.atContentPosition(position: DoubleOffset, alignment: Alignment = Alignment.Center): Modifier(source)

Anchors one direct overlay child at a source content coordinate.

The owning tiled image consumes only the innermost anchor on the direct child's modifier chain. Changing the anchor invalidates overlay geometry but leaves the retained tile paint layer and its image observations intact.

Receiver

modifier chain applied to one direct overlay child.

Return

this chain with one active parent-data provider appended.

Parameters

position

finite source content coordinate.

alignment

placement of the child's extent relative to the transformed coordinate.

Throws

when this scope has escaped its callback or constructing thread.


fun Modifier.atContentPosition(position: StateSource<DoubleOffset>, alignment: Alignment = Alignment.Center): Modifier(source)

Anchors one direct overlay child at an independently revisioned source content coordinate.

The source is observed only while the retained child is attached. Notifications may arrive on any thread and commit at the shared frame cutoff; only parent measurement and overlay placement are invalidated, while tile observations, images, and paint remain unchanged. Replacing the source identity closes the previous observation before subscribing to the replacement, and detach or close drops every pending position without closing the externally owned source.

Receiver

modifier chain applied to one direct overlay child.

Return

this chain with one active revisioned parent-data provider appended.

Parameters

position

externally owned revision history of finite source content coordinates.

alignment

placement of the child's extent relative to the committed transformed coordinate.

Throws

when this scope has escaped its callback or constructing thread.

when attachment or source replacement cannot establish an observation, or when replacement, detach, or close cannot release one.