SvgTextContentElement Class
https://w3c.github.io/svgwg/svg2-draft/text.html#svgtextcontentelement
public abstract class SvgTextContentElement : SvgGraphicsElement- Inheritance
SvgGraphicsElementSvgTextContentElement
Properties
| Name | Description |
|---|---|
| LengthAdjust | Gets the lengthAdjust attribute as a SVGAnimatedEnumeration object. |
| TextLength | Gets the textLength attribute as a SVGAnimatedLength object. |
LengthAdjust
SvgElements.g.csGets the lengthAdjust attribute as a SVGAnimatedEnumeration object.
public SvgAnimatedEnumeration LengthAdjust { get; }TextLength
SvgElements.g.csGets the textLength attribute as a SVGAnimatedLength object.
public SvgAnimatedLength TextLength { get; }Methods
| Name | Description |
|---|---|
| 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.cshttps://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.cshttps://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.cshttps://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getEndPositionOfChar: the position of the character moved by its advance along its progression.
GetExtentOfChar(uint)
SvgElements.cshttps://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getExtentOfChar: the bounding box of the glyph cell of the character.
GetNumberOfChars()
SvgElements.cshttps://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.cshttps://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)
SvgElements.cshttps://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)
SvgElements.cshttps://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.
Parameters
Returns
See also
SelectSubString(uint, uint)
SvgElements.cshttps://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.
Parameters
See also
Constants
| Name | Description |
|---|---|
| LengthadjustSpacing | The LENGTHADJUST_SPACING constant (1). |
| LengthadjustSpacingandglyphs | The LENGTHADJUST_SPACINGANDGLYPHS constant (2). |
| LengthadjustUnknown | The LENGTHADJUST_UNKNOWN constant (0). |
LengthadjustSpacing
The LENGTHADJUST_SPACING constant (1).
public const ushort LengthadjustSpacing = 1LengthadjustSpacingandglyphs
The LENGTHADJUST_SPACINGANDGLYPHS constant (2).
public const ushort LengthadjustSpacingandglyphs = 2LengthadjustUnknown
The LENGTHADJUST_UNKNOWN constant (0).
public const ushort LengthadjustUnknown = 0