openrndr / org.openrndr.shape / GroupNode

GroupNode

open class GroupNode : CompositionNode (source)

A CompositionNode that functions as a group node

Constructors

<init>

A CompositionNode that functions as a group node

GroupNode(children: MutableList<CompositionNode> = mutableListOf())

Properties

bounds

a Rectangle that describes the bounding box of the contents

open val bounds: Rectangle

children

val children: MutableList<CompositionNode>

Functions

copy

fun copy(id: String? = this.id, parent: CompositionNode? = null, transform: Matrix44 = this.transform, fill: CompositionColor = this.fill, stroke: CompositionColor = this.stroke, children: MutableList<CompositionNode> = this.children): GroupNode

equals

open fun equals(other: Any?): Boolean

hashCode

open 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