SvgId

value class SvgId(val value: String)(source)

An ID tied to some reusable SVG element.

Useful as a way to get a reference to IDs for gradients and patterns.

For example:

Svg(...) {
val goldToOrangeGradientId = SvgId("goldToOrangeGradient")
Defs {
LinearGradient(goldToOrangeGradientId) {
Stop(10.percent, Colors.Gold)
Stop(90.percent, Colors.DarkOrange)
}
}

Circle {
cx(100); cy(100); r(50)
fill(goldToOrangeGradientId)
}
}

Constructors

Link copied to clipboard
constructor(value: String)

Properties

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

Functions

Link copied to clipboard
open override fun toString(): String