Class SVGAngle
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The SVGAngle interface is used to represent a value that can be an {{cssxref("<angle>")}} or {{cssxref("<number>")}} value.
[Value("SVGAngle")]
public class SVGAngle
- Inheritance
-
SVGAngle
- Inherited Members
Remarks
The SVGAngle returned from AnimVal and BaseVal is read only, but the SVGAngle returned from CreateSVGAngle() is writable. When designated as read only, attempts to modify the object will result in an exception being thrown.
An SVGAngle object can be associated with a particular element. The associated element is used to determine which element's content attribute to update if the object reflects an attribute. Unless otherwise described, an SVGAngle object is not associated with any element.
Every SVGAngle object operates in one of two modes:
Constructors
SVGAngle()
public SVGAngle()
Fields
SVG_ANGLETYPE_DEG
[Value("SVG_ANGLETYPE_DEG")]
public const ushort SVG_ANGLETYPE_DEG = 2
Field Value
SVG_ANGLETYPE_GRAD
[Value("SVG_ANGLETYPE_GRAD")]
public const ushort SVG_ANGLETYPE_GRAD = 4
Field Value
SVG_ANGLETYPE_RAD
[Value("SVG_ANGLETYPE_RAD")]
public const ushort SVG_ANGLETYPE_RAD = 3
Field Value
SVG_ANGLETYPE_UNKNOWN
[Value("SVG_ANGLETYPE_UNKNOWN")]
public const ushort SVG_ANGLETYPE_UNKNOWN = 0
Field Value
SVG_ANGLETYPE_UNSPECIFIED
[Value("SVG_ANGLETYPE_UNSPECIFIED")]
public const ushort SVG_ANGLETYPE_UNSPECIFIED = 1
Field Value
Properties
UnitType
The unitType property of the SVGAngle interface is one of the unit type constants and represents the units in which this angle's value is expressed.
[Value("unitType")]
public ushort UnitType { get; }
Property Value
- ushort
A number representing the numeric value of the constant.
Remarks
Value
The value property of the SVGAngle interface represents the floating point value of the <angle> in degrees.
[Value("value")]
public Number Value { get; set; }
Property Value
- Number
A number; the angle value in degrees.
Remarks
Setting this attribute will cause ValueInSpecifiedUnits and ValueAsString to be updated automatically to reflect this setting.
ValueAsString
The valueAsString property of the SVGAngle interface represents the angle's value as a string, in the units expressed by UnitType.
[Value("valueAsString")]
public string ValueAsString { get; set; }
Property Value
- string
A string; the value of the angle.
Remarks
Setting this attribute will cause Value, ValueInSpecifiedUnits, and UnitType to be updated automatically to reflect this setting.
ValueInSpecifiedUnits
The valueInSpecifiedUnits property of the SVGAngle interface represents the value of this angle as a number, in the units expressed by the angle's UnitType.
[Value("valueInSpecifiedUnits")]
public Number ValueInSpecifiedUnits { get; set; }
Property Value
- Number
A number; the numeric factor of the angle.
Remarks
Setting this attribute will cause Value and ValueAsString to be updated automatically to reflect this setting.
Methods
ConvertToSpecifiedUnits(ushort)
The convertToSpecifiedUnits() method of the SVGAngle interface allows you to convert the angle's value to the specified unit type.
[Value("convertToSpecifiedUnits")]
public GlobalObject.Undefined ConvertToSpecifiedUnits(ushort unitType)
Parameters
unitTypeushort
Returns
- GlobalObject.Undefined
None ('undefined').
Remarks
NewValueSpecifiedUnits(ushort, Number)
The newValueSpecifiedUnits() method of the SVGAngle interface sets the value to a number with an associated UnitType, thereby replacing the values for all of the attributes on the object.
[Value("newValueSpecifiedUnits")]
public GlobalObject.Undefined NewValueSpecifiedUnits(ushort unitType, Number valueInSpecifiedUnits)
Parameters
Returns
- GlobalObject.Undefined
None ('undefined').