Class SVGAngle

Class SVGAngle

Namespace: Aspose.Html.Dom.Svg.DataTypes
Assembly: Aspose.HTML.dll (25.2.0)

The SVGAngle interface corresponds to the angle basic data type.

[DOMName("SVGAngle")]
[DOMObject]
[ComVisible(true)]
public class SVGAngle : SVGValueType, INotifyPropertyChanged, IDisposable

Inheritance

objectDOMObjectSVGValueTypeSVGAngle

Implements

INotifyPropertyChanged, IDisposable

Inherited Members

SVGValueType.Dispose(), SVGValueType.Dispose(bool), DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Fields

SVG_ANGLETYPE_DEG

The unit type was explicitly set to degrees.

[DOMName("SVG_ANGLETYPE_DEG")]
public const ushort SVG_ANGLETYPE_DEG = 2

Field Value

ushort

SVG_ANGLETYPE_GRAD

The unit type is radians.

[DOMName("SVG_ANGLETYPE_GRAD")]
public const ushort SVG_ANGLETYPE_GRAD = 4

Field Value

ushort

SVG_ANGLETYPE_RAD

The unit type is radians.

[DOMName("SVG_ANGLETYPE_RAD")]
public const ushort SVG_ANGLETYPE_RAD = 3

Field Value

ushort

SVG_ANGLETYPE_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.

[DOMName("SVG_ANGLETYPE_UNKNOWN")]
public const ushort SVG_ANGLETYPE_UNKNOWN = 0

Field Value

ushort

SVG_ANGLETYPE_UNSPECIFIED

No unit type was provided (i.e., a unitless value was specified). For angles, a unitless value is treated the same as if degrees were specified.

[DOMName("SVG_ANGLETYPE_UNSPECIFIED")]
public const ushort SVG_ANGLETYPE_UNSPECIFIED = 1

Field Value

ushort

Properties

UnitType

The type of the value as specified by one of the SVG_ANGLETYPE_* constants defined on this interface.

[DOMName("unitType")]
public ushort UnitType { get; }

Property Value

ushort

Value

The angle value as a floating point value, in degrees. Setting this attribute will cause valueInSpecifiedUnits and valueAsString to be updated automatically to reflect this setting.

[DOMName("value")]
public float Value { get; set; }

Property Value

float

Exceptions

DOMException

Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR Raised when the angle corresponds to a read only attribute or when the object itself is read only.

ValueAsString

The angle 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.

[DOMName("valueAsString")]
public string ValueAsString { get; set; }

Property Value

string

Exceptions

DOMException

Code Aspose.Html.Dom.DOMException.SYNTAX_ERR Raised if the assigned string cannot be parsed as a valid angle.

DOMException

Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR Raised when the angle corresponds to a read only attribute or when the object itself is read only.

ValueInSpecifiedUnits

The angle 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.

[DOMName("valueInSpecifiedUnits")]
public float ValueInSpecifiedUnits { get; set; }

Property Value

float

Exceptions

DOMException

Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR Raised when the angle corresponds to a read only attribute or when the object itself is read only.

Methods

ConvertToSpecifiedUnits(ushort)

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.

[DOMName("convertToSpecifiedUnits")]
public void ConvertToSpecifiedUnits(ushort unitType)

Parameters

unitType ushort

The unit type to switch to (e.g., SVG_ANGLETYPE_DEG).

Exceptions

DOMException

Code Aspose.Html.Dom.DOMException.NOT_SUPPORTED_ERR Raised if unitType is SVG_ANGLETYPE_UNKNOWN or not a valid unit type constant (one of the other SVG_ANGLETYPE_* constants defined on this interface).

DOMException

Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR Raised when the angle corresponds to a read only attribute or when the object itself is read only.

NewValueSpecifiedUnits(ushort, float)

Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.

[DOMName("newValueSpecifiedUnits")]
public void NewValueSpecifiedUnits(ushort newUnitType, float valueInSpecifiedUnits)

Parameters

newUnitType ushort

The unit type for the value (e.g., SVG_ANGLETYPE_DEG).

valueInSpecifiedUnits float

The angle value.

Exceptions

DOMException

Code Aspose.Html.Dom.DOMException.NOT_SUPPORTED_ERR Raised if unitType is SVG_ANGLETYPE_UNKNOWN or not a valid unit type constant (one of the other SVG_ANGLETYPE_* constants defined on this interface).

DOMException

Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR Raised when the angle corresponds to a read only attribute or when the object itself is read only.

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

string

A System.String that represents this instance.