Expand Minimize

convertToSpecifiedUnits method

Changes the stored unit identifier to the specified type.

Scalable Vector Graphics: Basic Data Types and Interfaces, Section 4.5.11Internet Explorer 9

Syntax


HRESULT retVal = object.convertToSpecifiedUnits(unitType);

Parameters

unitType [in]

Type: short

The unit type to switch to (for example, SVG_ANGLETYPE_DEG or SVG_LENGTHTYPE_MM).

Return value

Type: HRESULT

This method can return one of these values.

Return codeDescription
W3CException_DOM_NOT_SUPPORTED_ERR

IE9 mode only.

The requested operation is not supported.

W3CException_DOM_NO_MODIFICATION_ALLOWED_ERR

IE9 mode only.

An attempt is made to modify an object that cannot be changed.

 

Exceptions

ExceptionCondition
NotSupportedError

An attempt is made to modify an object that cannot be changed. For versions earlier than Internet Explorer 10, DOM_NOT_SUPPORTED_ERR is returned.

NoModificationAllowedError

The requested operation is not supported. For versions earlier than Internet Explorer 10, NO_MODIFICATION_ALLOWED_ERR is returned.

Standards information

Remarks

The convertToSpecifiedUnits method preserves the same underlying stored value, but it resets the stored unit identifier to the specified unitType type. The unitType, valueInSpecifiedUnits, and valueAsString objects might be modified when you call this method.

See also

SVGAngle
SVGLength

 

 

Show:
© 2014 Microsoft. All rights reserved.