Source set: Android
class DrawConditionally(
val condition: RemoteBoolean,
val childSpan: CanvasOperationBuffer.Span,
val action: (RemoteComposeWriter, RemoteComposeCreationState) -> Unit,
) : CanvasOp()
Represents a conditional drawing block (drawConditionally).
Typically childSpan will be a CanvasOperationBuffer.Span, which if hasChildCommands will return false if empty.
Functions
write
Source set: Android
override fun write(writer: RemoteComposeWriter, creationState: RemoteComposeCreationState)
hasTransformsOrClips
Source set: Android
override fun hasTransformsOrClips(): Boolean
containsDrawingPrimitives
Source set: Android
override fun containsDrawingPrimitives(): Boolean
switchesCanvasOrHasCondition
Source set: Android
override fun switchesCanvasOrHasCondition(): Boolean
emitsWireCommands
Source set: Android
override fun emitsWireCommands(): Boolean
optimizeChildScopes
Source set: Android
override fun optimizeChildScopes(buffer: CanvasOperationBuffer)
shouldPrune
Source set: Android
override fun shouldPrune(buffer: CanvasOperationBuffer) = !childSpan.emitsWireCommands()
toString
Source set: Android
override fun toString(): String