SVGLengthConvertToSpecifiedUnits Method
Preserve the same underlying stored value, but reset the stored unit identifier to the given unitType. Object attributes unitType, valueInSpecifiedUnits and valueAsString might be modified as a result of this method. For example, if the original value were "0.5cm" and the method was invoked to convert to millimeters, then the unitType would be changed to SVG_LENGTHTYPE_MM, valueInSpecifiedUnits would be changed to the numeric value 5 and valueAsString would be changed to "5mm".

Namespace: Aspose.Html.Dom.Svg.DataTypes
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 21.4
Syntax
public void ConvertToSpecifiedUnits(
	ushort unitType
)

Parameters

unitType
Type: SystemUInt16
The unit type to switch to (e.g., SVG_LENGTHTYPE_MM).
Exceptions
ExceptionCondition
DOMException Code NOT_SUPPORTED_ERR Raised if unitType is SVG_LENGTHTYPE_UNKNOWN or not a valid unit type constant (one of the other SVG_LENGTHTYPE_* constants defined on this interface).
DOMException Code NO_MODIFICATION_ALLOWED_ERR Raised when the length corresponds to a read only attribute or when the object itself is read only.
See Also