openrndr / org.openrndr.shape / ShapeNode

ShapeNode

class ShapeNode : CompositionNode (source)

a CompositionNode that holds a single Shape

Constructors

<init>

a CompositionNode that holds a single Shape

ShapeNode(shape: Shape)

Properties

bounds

a Rectangle that describes the bounding box of the contents

val bounds: Rectangle

effectiveShape

the local Shape with the effectiveTransform applied to it

val effectiveShape: Shape

shape

var shape: Shape

Functions

conflate

apply transforms of all ancestor nodes and return a new detached ShapeNode with conflated transform

fun conflate(): ShapeNode

copy

fun copy(id: String? = this.id, parent: CompositionNode? = null, transform: Matrix44 = this.transform, fill: CompositionColor = this.fill, stroke: CompositionColor = this.stroke, shape: Shape = this.shape): ShapeNode

equals

fun equals(other: Any?): Boolean

flatten

apply transforms of all ancestor nodes and return a new detached shape node with identity transform and transformed Shape

fun flatten(): ShapeNode

hashCode

fun hashCode(): Int

Extension Functions

findAll

fun CompositionNode.findAll(filter: (CompositionNode) -> Boolean): List<CompositionNode>

findGroups

find all descendant GroupNode nodes, including potentially this node

fun CompositionNode.findGroups(): List<GroupNode>

findImages

find all descendant ImageNode nodes, including potentially this node

fun CompositionNode.findImages(): List<ImageNode>

findShapes

find all descendant ShapeNode nodes, including potentially this node

fun CompositionNode.findShapes(): List<ShapeNode>

findTerminals

fun CompositionNode.findTerminals(filter: (CompositionNode) -> Boolean): List<CompositionNode>

remove

remove node from its parent CompositionNode

fun CompositionNode.remove(): Unit

visitAll

visit this CompositionNode and all descendant nodes and execute visitor

fun CompositionNode.visitAll(visitor: CompositionNode.() -> Unit): Unit