Class SVGTextContentElement
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The SVGTextContentElement interface is implemented by elements that support rendering child text content. It is inherited by various text-related interfaces, such as SVGTextElement, SVGTSpanElement, and SVGTextPathElement.
[Value("SVGTextContentElement")]
public class SVGTextContentElement : SVGGraphicsElement, ElementCSSInlineStyle, GlobalEventHandlers, SVGElementInstance, HTMLOrSVGElement, SVGTests
- Inheritance
-
SVGTextContentElement
- Implements
- Derived
- Inherited Members
Remarks
Constructors
SVGTextContentElement()
public SVGTextContentElement()
Fields
LENGTHADJUST_SPACING
[Value("LENGTHADJUST_SPACING")]
public const ushort LENGTHADJUST_SPACING = 1
Field Value
LENGTHADJUST_SPACINGANDGLYPHS
[Value("LENGTHADJUST_SPACINGANDGLYPHS")]
public const ushort LENGTHADJUST_SPACINGANDGLYPHS = 2
Field Value
LENGTHADJUST_UNKNOWN
[Value("LENGTHADJUST_UNKNOWN")]
public const ushort LENGTHADJUST_UNKNOWN = 0
Field Value
Properties
LengthAdjust
The lengthAdjust read-only property of the SVGTextContentElement interface reflects the {{SVGAttr("lengthAdjust")}} attribute of the given element. It takes one of the LENGTHADJUST_* constants defined on this interface.
[Value("lengthAdjust")]
public SVGAnimatedEnumeration LengthAdjust { get; }
Property Value
Remarks
-lengthAdjust
-SVGAnimatedEnumeration
TextLength
The textLength read-only property of the SVGTextContentElement interface reflects the {{SVGAttr("textLength")}} attribute of the given element.
[Value("textLength")]
public SVGAnimatedLength TextLength { get; }
Property Value
Remarks
-textLength
-SVGAnimatedLength
Methods
GetCharNumAtPosition(DOMPointInit)
The getCharNumAtPosition() method of the SVGTextContentElement interface represents the character which caused a text glyph to be rendered at a given position in the coordinate system. Because the relationship between characters and glyphs is not one-to-one, only the first character of the relevant typographic character is returned.
[Value("getCharNumAtPosition")]
public long GetCharNumAtPosition(DOMPointInit point = null)
Parameters
pointDOMPointInit
Returns
- long
A long; the index of the character that corresponds to the position.
Remarks
If no character is found at the specified position, -1 is returned.
GetComputedTextLength()
The getComputedTextLength() method of the SVGTextContentElement interface represents the computed length for the text within the element.
[Value("getComputedTextLength")]
public Number GetComputedTextLength()
Returns
- Number
A float.
Remarks
GetEndPositionOfChar(ulong)
The getEndPositionOfChar() method of the SVGTextContentElement interface returns the trailing position of a typographic character after text layout has been performed.
[Value("getEndPositionOfChar")]
public DOMPoint GetEndPositionOfChar(ulong charnum)
Parameters
charnumulong
Returns
Remarks
GetExtentOfChar(ulong)
The getExtentOfChar() method of the SVGTextContentElement interface the represents computed tight bounding box of the glyph cell that corresponds to a given typographic character.
[Value("getExtentOfChar")]
public DOMRect GetExtentOfChar(ulong charnum)
Parameters
charnumulong
Returns
Remarks
GetNumberOfChars()
The getNumberOfChars() method of the SVGTextContentElement interface represents the total number of addressable characters available for rendering within the current element, regardless of whether they will be rendered.
[Value("getNumberOfChars")]
public long GetNumberOfChars()
Returns
- long
A long.
Remarks
GetRotationOfChar(ulong)
The getRotationOfChar() method of the SVGTextContentElement interface the represents the rotation of a typographic character.
[Value("getRotationOfChar")]
public Number GetRotationOfChar(ulong charnum)
Parameters
charnumulong
Returns
- Number
A float; the rotation angle of the character in degrees.
Remarks
GetStartPositionOfChar(ulong)
The getStartPositionOfChar() method of the SVGTextContentElement interface returns the position of a typographic character after text layout has been performed.
[Value("getStartPositionOfChar")]
public DOMPoint GetStartPositionOfChar(ulong charnum)
Parameters
charnumulong
Returns
Remarks
GetSubStringLength(ulong, ulong)
The getSubStringLength() method of the SVGTextContentElement interface represents the computed length of the formatted text advance distance for a substring of text within the element.
[Value("getSubStringLength")]
public Number GetSubStringLength(ulong charnum, ulong nchars)
Parameters
Returns
- Number
A float.
Remarks
Note that this method only accounts for the widths of the glyphs in the substring and any extra spacing inserted by the CSS letter-spacing and word-spacing properties. Visual spacing adjustments made by the x attribute are ignored.
SelectSubString(ulong, ulong)
[Value("selectSubString")]
public GlobalObject.Undefined SelectSubString(ulong charnum, ulong nchars)