SVGLength Class
The SVGLength interface corresponds 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, as described below.
Inheritance Hierarchy
SystemObject
  Aspose.Svg.DomDOMObject
    Aspose.Svg.DataTypesSVGValueType
      Aspose.Svg.DataTypesSVGLength

Namespace: Aspose.Svg.DataTypes
Assembly: Aspose.SVG (in Aspose.SVG.dll) Version: 20.2
Syntax
public class SVGLength : SVGValueType

The SVGLength type exposes the following members.

Properties
  NameDescription
Public propertyUnitType
The type of the value as specified by one of the SVG_LENGTHTYPE_* constants defined on this interface.
Public propertyValue
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.
Public propertyValueAsString
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.
Public propertyValueInSpecifiedUnits
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.
Methods
  NameDescription
Public methodConvertToSpecifiedUnits
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".
Public methodDispose
Releases unmanaged and - optionally - managed resources.
(Inherited from SVGValueType.)
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources.
(Inherited from SVGValueType.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNewValueSpecifiedUnits
Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Fields
  NameDescription
Public fieldStatic memberSVG_LENGTHTYPE_CM
A value was specified using the cm units defined in CSS2.
Public fieldStatic memberSVG_LENGTHTYPE_EMS
A value was specified using the em units defined in CSS2.
Public fieldStatic memberSVG_LENGTHTYPE_EXS
A value was specified using the ex units defined in CSS2.
Public fieldStatic memberSVG_LENGTHTYPE_IN
A value was specified using the in units defined in CSS2.
Public fieldStatic memberSVG_LENGTHTYPE_MM
A value was specified using the mm units defined in CSS2.
Public fieldStatic memberSVG_LENGTHTYPE_NUMBER
No unit type was provided (i.e., a unitless value was specified), which indicates a value in user units.
Public fieldStatic memberSVG_LENGTHTYPE_PC
A value was specified using the pc units defined in CSS2.
Public fieldStatic memberSVG_LENGTHTYPE_PERCENTAGE
A percentage value was specified.
Public fieldStatic memberSVG_LENGTHTYPE_PT
A value was specified using the pt units defined in CSS2.
Public fieldStatic memberSVG_LENGTHTYPE_PX
A value was specified using the px units defined in CSS2.
Public fieldStatic memberSVG_LENGTHTYPE_UNKNOWN
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.
See Also