Table of Contents

Class SVGLength

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The SVGLength interface correspond to the <length> basic data type.

[Value("SVGLength")]
public class SVGLength
Inheritance
SVGLength
Inherited Members

Remarks

An SVGLength object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.

See also on MDN

Constructors

SVGLength()

public SVGLength()

Fields

SVG_LENGTHTYPE_CM

[Value("SVG_LENGTHTYPE_CM")]
public const ushort SVG_LENGTHTYPE_CM = 6

Field Value

ushort

SVG_LENGTHTYPE_EMS

[Value("SVG_LENGTHTYPE_EMS")]
public const ushort SVG_LENGTHTYPE_EMS = 3

Field Value

ushort

SVG_LENGTHTYPE_EXS

[Value("SVG_LENGTHTYPE_EXS")]
public const ushort SVG_LENGTHTYPE_EXS = 4

Field Value

ushort

SVG_LENGTHTYPE_IN

[Value("SVG_LENGTHTYPE_IN")]
public const ushort SVG_LENGTHTYPE_IN = 8

Field Value

ushort

SVG_LENGTHTYPE_MM

[Value("SVG_LENGTHTYPE_MM")]
public const ushort SVG_LENGTHTYPE_MM = 7

Field Value

ushort

SVG_LENGTHTYPE_NUMBER

[Value("SVG_LENGTHTYPE_NUMBER")]
public const ushort SVG_LENGTHTYPE_NUMBER = 1

Field Value

ushort

SVG_LENGTHTYPE_PC

[Value("SVG_LENGTHTYPE_PC")]
public const ushort SVG_LENGTHTYPE_PC = 10

Field Value

ushort

SVG_LENGTHTYPE_PERCENTAGE

[Value("SVG_LENGTHTYPE_PERCENTAGE")]
public const ushort SVG_LENGTHTYPE_PERCENTAGE = 2

Field Value

ushort

SVG_LENGTHTYPE_PT

[Value("SVG_LENGTHTYPE_PT")]
public const ushort SVG_LENGTHTYPE_PT = 9

Field Value

ushort

SVG_LENGTHTYPE_PX

[Value("SVG_LENGTHTYPE_PX")]
public const ushort SVG_LENGTHTYPE_PX = 5

Field Value

ushort

SVG_LENGTHTYPE_UNKNOWN

[Value("SVG_LENGTHTYPE_UNKNOWN")]
public const ushort SVG_LENGTHTYPE_UNKNOWN = 0

Field Value

ushort

Properties

UnitType

The unitType property of the SVGLength interface that represents type of the value as specified by one of the SVG_LENGTHTYPE_* constants defined on this interface.

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

Property Value

ushort

One of the following:

Remarks

Value

The value property of the SVGLength interface represents the floating point value of the <length> in user units.

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

Property Value

Number

The length value in user units as a float.

Remarks

Setting this attribute will cause ValueInSpecifiedUnits and ValueAsString to be updated automatically to reflect this setting.

-SVGAnimatedLength

See also on MDN

ValueAsString

The valueAsString property of the SVGLength interface represents the <length>'s value as a string, in the units expressed by UnitType.

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

Property Value

string

A string.

Remarks

Setting this attribute will cause Value, ValueInSpecifiedUnits, and UnitType to be updated automatically to reflect this setting.

-<number>
-<length>
-SVGAnimatedLength

See also on MDN

ValueInSpecifiedUnits

The valueInSpecifiedUnits property of the SVGLength interface represents floating point value, in the units expressed by UnitType.

[Value("valueInSpecifiedUnits")]
public Number ValueInSpecifiedUnits { get; set; }

Property Value

Number

The numeric factor of the length as a float.

Remarks

Setting this attribute will cause Value and ValueAsString to be updated automatically to reflect this setting.

-SVGAnimatedLength

See also on MDN

Methods

ConvertToSpecifiedUnits(ushort)

The convertToSpecifiedUnits() method of the SVGLength interface allows you to convert the length's value to the specified unit type.

[Value("convertToSpecifiedUnits")]
public GlobalObject.Undefined ConvertToSpecifiedUnits(ushort unitType)

Parameters

unitType ushort

Returns

GlobalObject.Undefined

None ('undefined').

Remarks

NewValueSpecifiedUnits(ushort, Number)

The newValueSpecifiedUnits() method of the SVGLength interface resets the value as 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

unitType ushort
valueInSpecifiedUnits Number

Returns

GlobalObject.Undefined

None ('undefined').

Remarks