SVGLength

The SVGLength interface correspond to the \ basic data type.

MDN Reference

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed interface UnitType

Properties

Link copied to clipboard

The unitType property of the SVGLength interface that represents type of the value as specified by one of the SVG_LENGTHTYPE_* constants defined on this interface.

Link copied to clipboard

The value property of the SVGLength interface represents the floating point value of the \ in user units.

Link copied to clipboard

The valueAsString property of the SVGLength interface represents the \'s value as a string, in the units expressed by SVGLength.unitType.

Link copied to clipboard

The valueInSpecifiedUnits property of the SVGLength interface represents floating point value, in the units expressed by SVGLength.unitType.

Functions

Link copied to clipboard

The convertToSpecifiedUnits() method of the SVGLength interface allows you to convert the length's value to the specified unit type.

Link copied to clipboard
fun newValueSpecifiedUnits(unitType: SVGLength.UnitType, valueInSpecifiedUnits: Float)

The newValueSpecifiedUnits() method of the SVGLength interface resets the value as a number with an associated SVGLength.unitType, thereby replacing the values for all of the attributes on the object.