openrndr / org.openrndr.shape / CompositionNode

CompositionNode

sealed class CompositionNode (source)

Describes a node in a composition

Properties

attributes

node attributes, these are used for loading and saving to SVG

var attributes: MutableMap<String, String?>

bounds

a Rectangle that describes the bounding box of the contents

abstract val bounds: Rectangle

effectiveFill

the effective fill ColorRGBa calculated from ancestor nodes and current node, null if no fill

val effectiveFill: ColorRGBa?

effectiveShadeStyle

the effective ShadeStyle calculated from ancestor nodes and current node, null if no shade style

val effectiveShadeStyle: ShadeStyle?

effectiveStroke

the effective stroke ColorRGBa calculated from ancestor nodes and current node, null if no stroke

val effectiveStroke: ColorRGBa?

effectiveTransform

the effective transform Matrix44 calculated from ancestor nodes and current node

val effectiveTransform: Matrix44

fill

cascading fill color

var fill: CompositionColor

id

node identifier

var id: String?

parent

parent node

var parent: CompositionNode?

shadeStyle

shadeStyle

var shadeStyle: CompositionShadeStyle

stroke

cascading stroke color

var stroke: CompositionColor

strokeWeight

cascading stroke weight

var strokeWeight: CompositionStrokeWeight

transform

local transform

open var transform: Matrix44

userData

a map that stores user data

val userData: MutableMap<String, Any>

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

Inheritors

GroupNode

A CompositionNode that functions as a group node

open class GroupNode : CompositionNode

ImageNode

a CompositionNode that holds a single image ColorBuffer

class ImageNode : CompositionNode

ShapeNode

a CompositionNode that holds a single Shape

class ShapeNode : CompositionNode

TextNode

a CompositionNode that holds a single text

data class TextNode : CompositionNode