convertToSpecifiedUnits method
Changes the stored unit identifier to the specified type.
![]() ![]() |
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 code | Description |
|---|---|
|
IE9 mode only. The requested operation is not supported. |
|
IE9 mode only. An attempt is made to modify an object that cannot be changed. |
Exceptions
| Exception | Condition |
|---|---|
|
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. |
|
The requested operation is not supported. For versions earlier than Internet Explorer 10, NO_MODIFICATION_ALLOWED_ERR is returned. |
Standards information
- Scalable Vector Graphics: Basic Data Types and Interfaces, Section 4.5.11
Remarks
The ISVGLength::convertToSpecifiedUnits method preserves the same underlying stored value, but it resets the stored unit identifier to the specified unitType type. The ISVGLength::unitType, ISVGLength::valueInSpecifiedUnits, and ISVGLength::valueAsString objects might be modified when you call this method.

