Length

extern class js.html.svg.LengthAvailable in js

The SVGLength interface correspond to the <length> basic data type.

An SVGLength 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.
var unitType(default,null) : IntThe type of the value as specified by one of the SVG_LENGTHTYPE_* 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.

Getter throws DOMException. Setter throws DOMException.
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 <length>.
  • 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 static inline var SVG_LENGTHTYPE_CM : IntA value was specified using the cm units defined in CSS2. static inline var SVG_LENGTHTYPE_EMS : IntA value was specified using the em units defined in CSS2. static inline var SVG_LENGTHTYPE_EXS : IntA value was specified using the ex units defined in CSS2. static inline var SVG_LENGTHTYPE_IN : IntA value was specified using the in units defined in CSS2. static inline var SVG_LENGTHTYPE_MM : IntA value was specified using the mm units defined in CSS2. static inline var SVG_LENGTHTYPE_NUMBER : IntNo unit type was provided (i.e., a unitless value was specified), which indicates a value in user units. static inline var SVG_LENGTHTYPE_PC : IntA value was specified using the pc units defined in CSS2. static inline var SVG_LENGTHTYPE_PERCENTAGE : IntA percentage value was specified. static inline var SVG_LENGTHTYPE_PT : IntA value was specified using the pt units defined in CSS2. static inline var SVG_LENGTHTYPE_PX : IntA value was specified using the px units defined in CSS2. static inline var SVG_LENGTHTYPE_UNKNOWN : IntThe 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.
version #18160, modified 2013-05-01 11:55:22 by api
0 comment