DrawNode

class DrawNode : ComponentNode
kotlin.Any
   ↳ androidx.ui.core.ComponentNode
   ↳ androidx.ui.core.DrawNode

Backing node for the Draw component.

Summary

Public constructors

Backing node for the Draw component.

Public methods

Unit
attach(owner: Owner)

Set the Owner of this ComponentNode.

Unit

Remove the ComponentNode from the Owner.

Unit

Inherited functions

Inherited extension functions

From androidx.ui.core
Unit

Inserts a child ComponentNode at a last index.

ComponentNode?

Executes selector on every parent of this ComponentNode and returns the closest ComponentNode to return true from selector or null if selector returns false for all ancestors.

LayoutNode?

Executes block on first level of LayoutNode descendants of this ComponentNode and returns the last LayoutNode to return true from block.

Boolean

Returns true if this ComponentNode has no descendant LayoutNodes.

Boolean

Returns true if this ComponentNode currently has an ComponentNode.owner.

Owner

Returns ComponentNode.owner or throws if it is null.

Unit

Executes block on first level of LayoutNode descendants of this ComponentNode.

Properties

Boolean

DensityScope.(canvas: Canvas, parentSize: PxSize) -> Unit

DrawReceiver.(canvas: Canvas, parentSize: PxSize) -> Unit

Inherited properties

Public constructors

<init>

DrawNode()

Backing node for the Draw component.

Public methods

attach

fun attach(owner: Owner): Unit

Set the Owner of this ComponentNode. This ComponentNode must not already be attached. owner must match its parent.owner.

detach

fun detach(): Unit

Remove the ComponentNode from the Owner. The owner must not be null before this call and its parent's owner must be null before calling this. This will also detach all children. After executing, the owner will be null.

invalidate

fun invalidate(): Unit

Properties

needsPaint

var needsPaint: Boolean

onPaint

var onPaint: DensityScope.(canvas: Canvas, parentSize: PxSize) -> Unit

onPaintWithChildren

var onPaintWithChildren: DrawReceiver.(canvas: Canvas, parentSize: PxSize) -> Unit