Class SvgLength
- Namespace
- SharpVectors.Dom.Svg
- Assembly
- SharpVectors.Model.dll
public sealed class SvgLength : ISvgLength
- Inheritance
-
SvgLength
- Implements
- Inherited Members
Constructors
- SvgLength(string, string, SvgElement, SvgLengthDirection)
Creates a SvgLength value
Properties
- UnitType
The type of the value as specified by one of the constants specified above.
- Value
The value as an floating point value, in user units. Setting this attribute will cause valueInSpecifiedUnits and valueAsString to be updated automatically to reflect this setting.
- ValueAsString
The value as a string value, in the units expressed by unitType. Setting this attribute will cause value and valueInSpecifiedUnits to be updated automatically to reflect this setting.
- ValueInSpecifiedUnits
The value as an 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
- ConvertToSpecifiedUnits(SvgLengthType)
Preserve the same underlying stored value, but reset the stored unit identifier to the given unitType. Object attributes unitType, valueAsSpecified 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 MM, valueAsSpecified would be changed to the numeric value 5 and valueAsString would be changed to "5mm".
- NewValueSpecifiedUnits(SvgLengthType, double)
Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.