🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

toSvg

Returns an SVG representation of this path.

toSvg

Source set: Common
public fun Path.toSvg(asDocument: Boolean = false): String

Returns an SVG representation of this path. The caller can choose whether the returned SVG represents a fully-formed SVG document or only the path data. By default, only the path data is returned which can be used either with Path.addSvg or androidx.compose.ui.graphics.vector.PathParser.

Parameters

asDocument When set to true, this function returns a fully-formed SVG document, otherwise returns only the path data.