Chartbreaker
    Preparing search index...

    Interface SVGAngle

    The SVGAngle interface is used to represent a value that can be an <angle> or <number> value.

    MDN Reference

    interface SVGAngle {
        SVG_ANGLETYPE_DEG: 2;
        SVG_ANGLETYPE_GRAD: 4;
        SVG_ANGLETYPE_RAD: 3;
        SVG_ANGLETYPE_UNKNOWN: 0;
        SVG_ANGLETYPE_UNSPECIFIED: 1;
        unitType: number;
        value: number;
        valueAsString: string;
        valueInSpecifiedUnits: number;
        convertToSpecifiedUnits(unitType: number): void;
        newValueSpecifiedUnits(
            unitType: number,
            valueInSpecifiedUnits: number,
        ): void;
    }
    Index

    Properties

    SVG_ANGLETYPE_DEG: 2
    SVG_ANGLETYPE_GRAD: 4
    SVG_ANGLETYPE_RAD: 3
    SVG_ANGLETYPE_UNKNOWN: 0
    SVG_ANGLETYPE_UNSPECIFIED: 1
    unitType: number

    The unitType property of the SVGAngle interface is one of the unit type constants and represents the units in which this angle's value is expressed.

    MDN Reference

    value: number

    The value property of the SVGAngle interface represents the floating point value of the <angle> in degrees.

    MDN Reference

    valueAsString: string

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

    MDN Reference

    valueInSpecifiedUnits: number

    The valueInSpecifiedUnits property of the SVGAngle interface represents the value of this angle as a number, in the units expressed by the angle's SVGAngle.unitType.

    MDN Reference

    Methods

    • The convertToSpecifiedUnits() method of the SVGAngle interface allows you to convert the angle's value to the specified unit type.

      MDN Reference

      Parameters

      • unitType: number

      Returns void

    • The newValueSpecifiedUnits() method of the SVGAngle interface sets the value to a number with an associated SVGAngle.unitType, thereby replacing the values for all of the attributes on the object.

      MDN Reference

      Parameters

      • unitType: number
      • valueInSpecifiedUnits: number

      Returns void