ksvg / com.github.nwillc.ksvg.elements / SVG

SVG

(JS, JVM) class SVG : Container, HasDimensions

The SVG element itself.

Constructors

(JS, JVM)

<init>

The SVG element itself.

<init>(validation: Boolean = false, hasAttributes: HasAttributes = HasAttributesImpl(validation))

Properties

(JS, JVM)

viewBox

The viewBox attribute.

var viewBox: String?

Functions

(JS, JVM)

defs

Create a group element in this svg.

fun defs(block: DEFS.() -> Unit): DEFS
(JS, JVM)

getAttributes

Return the attribute map, with possible processing based on the renderMode.

fun getAttributes(renderMode: RenderMode): Map<String, String?>

render

Render the Element as SVG.

(JS) fun render(appendable: <ERROR CLASS>, renderMode: RenderMode): Unit
(JVM) fun render(appendable: Appendable, renderMode: RenderMode): Unit
(JS, JVM)

style

Create a style element.

fun style(block: STYLE.() -> Unit): STYLE

Companion Object Functions

(JS, JVM)

svg

Create an SVG element.

fun svg(validation: Boolean = false, block: SVG.() -> Unit): SVG