writeSVG

fun writeSVG(composition: Composition, topLevelId: String = "openrndr-svg"): String(source)

Generates an SVG string representation of a given vector composition.

Return

a string containing the SVG representation of the composition

Parameters

composition

the vector composition to be converted to an SVG string

topLevelId

an optional ID for the top-level SVG element, defaults to "openrndr-svg"