class js.html.svg.Angle

Available on js

The SVGAngle interface correspond to the <angle> basic data type.

An SVGAngle object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.



Documentation for this class was provided by MDN.

Class Fields

static var SVG_ANGLETYPE_DEG:Int

The unit type was explicitly set to degrees.

static var SVG_ANGLETYPE_GRAD:Int

The unit type is gradians.

static var SVG_ANGLETYPE_RAD:Int

The unit type is radians.

static var SVG_ANGLETYPE_UNKNOWN:Int

The unit type is not one of predefined unit types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

static var SVG_ANGLETYPE_UNSPECIFIED:Int

No unit type was provided (i.e., a unitless value was specified). For angles, a unitless value is treated the same as if degrees were specified.

Instance Fields

var unitType:Int

The type of the value as specified by one of the SVGANGLETYPE* constants defined on this interface.

var value:Float

The value as a floating point value, in user units. Setting this attribute will cause valueInSpecifiedUnits and valueAsString to be updated automatically to reflect this setting.

Exceptions on setting: a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the length corresponds to a read only attribute or when the object itself is read only.

var valueAsString:String

The value as a string value, in the units expressed by unitType. Setting this attribute will cause value, valueInSpecifiedUnits and unitType to be updated automatically to reflect this setting.

Exceptions on setting:

  • a DOMException with code SYNTAX_ERR is raised if the assigned string cannot be parsed as a valid <angle>.
  • a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the length corresponds to a read only attribute or when the object itself is read only.
Setter throws DOMException.

var valueInSpecifiedUnits:Float

The value as a floating point value, in the units expressed by unitType. Setting this attribute will cause value and valueAsString to be updated automatically to reflect this setting.

Exceptions on setting: a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the length corresponds to a read only attribute or when the object itself is read only.

function convertToSpecifiedUnits(unitType:Int):Void

function newValueSpecifiedUnits(unitType:Int, valueInSpecifiedUnits:Float):Void