SvgTextContentElement Class

https://w3c.github.io/svgwg/svg2-draft/text.html#svgtextcontentelement

public abstract class SvgTextContentElement : SvgGraphicsElement
Inheritance
SvgGraphicsElement SvgTextContentElement

Properties

NameDescription
LengthAdjustGets the lengthAdjust attribute as a SVGAnimatedEnumeration object.
TextLengthGets the textLength attribute as a SVGAnimatedLength object.

LengthAdjust

SvgElements.g.cs

Gets the lengthAdjust attribute as a SVGAnimatedEnumeration object.

public SvgAnimatedEnumeration LengthAdjust { get; }

Gets the textLength attribute as a SVGAnimatedLength object.

public SvgAnimatedLength TextLength { get; }

Methods

NameDescription
GetCharNumAtPosition(DomPointInit?)https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getCharNumAtPosition: the index of the character whose glyph cell contains the point (in the user space of the text element; the last one when they overlap), or -1.
GetComputedTextLength()https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getComputedTextLength: the sum of the advances of the characters (after textLength and lengthAdjust).
GetEndPositionOfChar(uint)https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getEndPositionOfChar: the position of the character moved by its advance along its progression.
GetExtentOfChar(uint)https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getExtentOfChar: the bounding box of the glyph cell of the character.
GetNumberOfChars()https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getNumberOfChars: the number of addressable characters of the element (UTF-16 code units after the white space processing, see SvgTextLayout); 0 when the element is not rendered.
GetRotationOfChar(uint)https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getRotationOfChar: the rotation of the character in degrees: its rotate attribute, the tangent of its text path, and the rotation of a sideways glyph of vertical text.
GetStartPositionOfChar(uint)https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getStartPositionOfChar: the position of the character on its baseline (the alignment point, not moved by dominant-baseline), in the user space of the text element.
GetSubStringLength(uint, uint)https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getSubStringLength: the sum of the advances of the characters from charnum (at most nchars). Throws an IndexSizeError when charnum is not the index of a character.
SelectSubString(uint, uint)https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__selectSubString (deprecated): selects the characters (the range of their DOM positions) in the selection of the document.

GetCharNumAtPosition(DomPointInit?)

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getCharNumAtPosition: the index of the character whose glyph cell contains the point (in the user space of the text element; the last one when they overlap), or -1.

public int GetCharNumAtPosition(DomPointInit? point = null)

GetComputedTextLength()

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getComputedTextLength: the sum of the advances of the characters (after textLength and lengthAdjust).

public float GetComputedTextLength()

GetEndPositionOfChar(uint)

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getEndPositionOfChar: the position of the character moved by its advance along its progression.

public DomPoint GetEndPositionOfChar(uint charnum)

GetExtentOfChar(uint)

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getExtentOfChar: the bounding box of the glyph cell of the character.

public DomRect GetExtentOfChar(uint charnum)

GetNumberOfChars()

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getNumberOfChars: the number of addressable characters of the element (UTF-16 code units after the white space processing, see SvgTextLayout); 0 when the element is not rendered.

public int GetNumberOfChars()

GetRotationOfChar(uint)

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getRotationOfChar: the rotation of the character in degrees: its rotate attribute, the tangent of its text path, and the rotation of a sideways glyph of vertical text.

public float GetRotationOfChar(uint charnum)

GetStartPositionOfChar(uint)

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getStartPositionOfChar: the position of the character on its baseline (the alignment point, not moved by dominant-baseline), in the user space of the text element.

public DomPoint GetStartPositionOfChar(uint charnum)

GetSubStringLength(uint, uint)

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getSubStringLength: the sum of the advances of the characters from charnum (at most nchars). Throws an IndexSizeError when charnum is not the index of a character.

public float GetSubStringLength(uint charnum, uint nchars)

SelectSubString(uint, uint)

SvgElements.cs

https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__selectSubString (deprecated): selects the characters (the range of their DOM positions) in the selection of the document.

public void SelectSubString(uint charnum, uint nchars)

Constants

NameDescription
LengthadjustSpacingThe LENGTHADJUST_SPACING constant (1).
LengthadjustSpacingandglyphsThe LENGTHADJUST_SPACINGANDGLYPHS constant (2).
LengthadjustUnknownThe LENGTHADJUST_UNKNOWN constant (0).

LengthadjustSpacing

The LENGTHADJUST_SPACING constant (1).

public const ushort LengthadjustSpacing = 1

LengthadjustSpacingandglyphs

The LENGTHADJUST_SPACINGANDGLYPHS constant (2).

public const ushort LengthadjustSpacingandglyphs = 2

LengthadjustUnknown

The LENGTHADJUST_UNKNOWN constant (0).

public const ushort LengthadjustUnknown = 0