Composition

class Composition(val root: CompositionNode, var bounds: CompositionDimensions = defaultCompositionDimensions)(source)

A vector composition.

Parameters

root

the root node of the composition

bounds

the dimensions of the composition

Constructors

Link copied to clipboard
constructor(root: CompositionNode, bounds: Rectangle)
constructor(root: CompositionNode, bounds: CompositionDimensions = defaultCompositionDimensions)

Functions

Link copied to clipboard

Calculates effective viewport transformation using viewBox and preserveAspectRatio. As per the SVG 2.0 spec.

Link copied to clipboard
fun clear(): Unit?
Link copied to clipboard
fun Composition.draw(drawFunction: CompositionDrawer.() -> Unit)

Draw into an existing Composition.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

The style attributes affecting the whole document, such as the viewBox area and aspect ratio.

Link copied to clipboard

SVG/XML namespaces

Link copied to clipboard
Link copied to clipboard