Correspond to the basic data type.

MDN Reference

interface SVGLength {
    SVG_LENGTHTYPE_CM: 6;
    SVG_LENGTHTYPE_EMS: 3;
    SVG_LENGTHTYPE_EXS: 4;
    SVG_LENGTHTYPE_IN: 8;
    SVG_LENGTHTYPE_MM: 7;
    SVG_LENGTHTYPE_NUMBER: 1;
    SVG_LENGTHTYPE_PC: 10;
    SVG_LENGTHTYPE_PERCENTAGE: 2;
    SVG_LENGTHTYPE_PT: 9;
    SVG_LENGTHTYPE_PX: 5;
    SVG_LENGTHTYPE_UNKNOWN: 0;
    unitType: number;
    value: number;
    valueAsString: string;
    valueInSpecifiedUnits: number;
    convertToSpecifiedUnits(unitType: number): void;
    newValueSpecifiedUnits(
        unitType: number,
        valueInSpecifiedUnits: number,
    ): void;
}

Properties

SVG_LENGTHTYPE_CM: 6
SVG_LENGTHTYPE_EMS: 3
SVG_LENGTHTYPE_EXS: 4
SVG_LENGTHTYPE_IN: 8
SVG_LENGTHTYPE_MM: 7
SVG_LENGTHTYPE_NUMBER: 1
SVG_LENGTHTYPE_PC: 10
SVG_LENGTHTYPE_PERCENTAGE: 2
SVG_LENGTHTYPE_PT: 9
SVG_LENGTHTYPE_PX: 5
SVG_LENGTHTYPE_UNKNOWN: 0
unitType: number
value: number
valueAsString: string
valueInSpecifiedUnits: number

Methods

  • Parameters

    • unitType: number

    Returns void

  • Parameters

    • unitType: number
    • valueInSpecifiedUnits: number

    Returns void