openrndr / org.openrndr.shape / Composition

Composition

class Composition (source)

A vector composition.

Parameters

root - the root node of the composition

documentBounds - the document bounds Rectangle of the composition, serves as a hint only

Constructors

<init>

A vector composition.

Composition(root: CompositionNode, documentBounds: Rectangle = DefaultCompositionBounds)

Properties

documentBounds

the document bounds Rectangle of the composition, serves as a hint only

var documentBounds: Rectangle

namespaces

svg/xml namespaces

val namespaces: MutableMap<String, String>

root

the root node of the composition

val root: CompositionNode

Functions

findGroup

fun findGroup(id: String): GroupNode?

findGroups

fun findGroups(): List<GroupNode>

findImage

fun findImage(id: String): ImageNode?

findImages

fun findImages(): List<ImageNode>

findShape

fun findShape(id: String): ShapeNode?

findShapes

fun findShapes(): List<ShapeNode>

Extension Functions

draw

fun Composition.draw(drawFunction: CompositionDrawer.() -> Unit): Unit

saveToFile

fun Composition.saveToFile(file: File): Unit

toSVG

fun Composition.toSVG(): String