Class SVGTextContentElement

Class SVGTextContentElement

Namespace: Aspose.Html.Dom.Svg
Assembly: Aspose.HTML.dll (25.2.0)

The SVGTextContentElement is inherited by various text-related interfaces, such as SVGTextElement, SVGTSpanElement, SVGTRefElement, SVGAltGlyphElement and SVGTextPathElement. For the methods on this interface that refer to an index to a character or a number of characters, these references are to be interpreted as an index to a UTF-16 code unit or a number of UTF-16 code units, respectively. This is for consistency with DOM Level 2 Core, where methods on the CharacterData interface use UTF-16 code units as indexes and counts within the character data.Thus for example, if the text content of a ‘text’ element is a single non-BMP character, such as U+10000, then invoking getNumberOfChars on that element will return 2 since there are two UTF-16 code units(the surrogate pair) used to represent that one character.

[DOMName("SVGTextContentElement")]
[DOMObject]
[ComVisible(true)]
public class SVGTextContentElement : SVGGraphicsElement, INotifyPropertyChanged, IEventTarget, IDisposable, IXPathNSResolver, IParentNode, IElementTraversal, IChildNode, IElementCSSInlineStyle, ISVGTests

Inheritance

objectDOMObjectEventTargetNodeElementSVGElementSVGGraphicsElementSVGTextContentElement

Derived

SVGTextPathElement, SVGTextPositioningElement

Implements

INotifyPropertyChanged, IEventTarget, IDisposable, IXPathNSResolver, IParentNode, IElementTraversal, IChildNode, IElementCSSInlineStyle, ISVGTests

Inherited Members

SVGGraphicsElement.GetBBox(), SVGGraphicsElement.GetCTM(), SVGGraphicsElement.GetScreenCTM(), SVGGraphicsElement.NearestViewportElement, SVGGraphicsElement.FarthestViewportElement, SVGGraphicsElement.Transform, SVGGraphicsElement.RequiredFeatures, SVGGraphicsElement.RequiredExtensions, SVGGraphicsElement.SystemLanguage, SVGElement.Id, SVGElement.OwnerSVGElement, SVGElement.ViewportElement, SVGElement.ClassName, SVGElement.Style, Element.GetAttributeNames(), Element.HasAttributes(), Element.GetAttribute(string), Element.GetAttributeNS(string, string), Element.SetAttribute(string, string), Element.SetAttributeNS(string, string, string), Element.RemoveAttribute(string), Element.RemoveAttributeNS(string, string), Element.HasAttribute(string), Element.HasAttributeNS(string, string), Element.ToggleAttribute(string), Element.ToggleAttribute(string, bool), Element.GetAttributeNode(string), Element.SetAttributeNode(Attr), Element.RemoveAttributeNode(Attr), Element.GetAttributeNodeNS(string, string), Element.SetAttributeNodeNS(Attr), Element.GetElementsByTagName(string), Element.GetElementsByTagNameNS(string, string), Element.Remove(), Element.QuerySelectorAll(string), Element.QuerySelector(string), Element.AttachShadow(ShadowRootMode), Element.GetElementsByClassName(string), Element.Dispose(bool), Element.ClassList, Element.LocalName, Element.NamespaceURI, Element.Prefix, Element.NodeName, Element.NodeType, Element.TagName, Element.Id, Element.ClassName, Element.TextContent, Element.Attributes, Element.FirstElementChild, Element.LastElementChild, Element.PreviousElementSibling, Element.NextElementSibling, Element.ChildElementCount, Element.Children, Element.InnerHTML, Element.OuterHTML, Element.ShadowRoot, Node.ELEMENT_NODE, Node.ATTRIBUTE_NODE, Node.TEXT_NODE, Node.CDATA_SECTION_NODE, Node.ENTITY_REFERENCE_NODE, Node.ENTITY_NODE, Node.PROCESSING_INSTRUCTION_NODE, Node.COMMENT_NODE, Node.DOCUMENT_NODE, Node.DOCUMENT_TYPE_NODE, Node.DOCUMENT_FRAGMENT_NODE, Node.NOTATION_NODE, Node.HasChildNodes(), Node.Normalize(), Node.CloneNode(), Node.CloneNode(bool), Node.IsEqualNode(Node), Node.IsSameNode(Node), Node.LookupPrefix(string), Node.LookupNamespaceURI(string), Node.IsDefaultNamespace(string), Node.InsertBefore(Node, Node), Node.ReplaceChild(Node, Node), Node.RemoveChild(Node), Node.AppendChild(Node), Node.Dispose(bool), Node.ToString(), Node.NodeType, Node.LocalName, Node.NamespaceURI, Node.Prefix, Node.NodeName, Node.BaseURI, Node.OwnerDocument, Node.ParentNode, Node.ParentElement, Node.ChildNodes, Node.FirstChild, Node.LastChild, Node.PreviousSibling, Node.NextSibling, Node.NodeValue, Node.TextContent, EventTarget.AddEventListener(string, DOMEventHandler, bool), EventTarget.AddEventListener(string, IEventListener), EventTarget.AddEventListener(string, IEventListener, bool), EventTarget.RemoveEventListener(string, DOMEventHandler, bool), EventTarget.RemoveEventListener(string, IEventListener), EventTarget.RemoveEventListener(string, IEventListener, bool), EventTarget.DispatchEvent(Event), EventTarget.Dispose(), EventTarget.Dispose(bool), DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Fields

LENGTHADJUST_SPACING

Corresponds to value ‘spacing’.

[DOMName("LENGTHADJUST_SPACING")]
public const ushort LENGTHADJUST_SPACING = 1

Field Value

ushort

LENGTHADJUST_SPACINGANDGLYPHS

Corresponds to value ‘spacingAndGlyphs’.

[DOMName("LENGTHADJUST_SPACINGANDGLYPHS")]
public const ushort LENGTHADJUST_SPACINGANDGLYPHS = 2

Field Value

ushort

LENGTHADJUST_UNKNOWN

The enumeration was set to a value that is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

[DOMName("LENGTHADJUST_UNKNOWN")]
public const ushort LENGTHADJUST_UNKNOWN = 0

Field Value

ushort

Properties

LengthAdjust

Corresponds to attribute ‘lengthAdjust’ on the given element. The value must be one of the length adjust constants defined on this interface.

[DOMName("lengthAdjust")]
public SVGAnimatedEnumeration LengthAdjust { get; }

Property Value

SVGAnimatedEnumeration

TextLength

Corresponds to attribute ‘textLength’ on the given element.

[DOMName("textLength")]
public SVGAnimatedLength TextLength { get; }

Property Value

SVGAnimatedLength

Methods

GetComputedTextLength()

The total sum of all of the advance values from rendering all of the characters within this element, including the advance value on the glyphs (horizontal or vertical), the effect of properties ‘kerning’, ‘letter-spacing’ and ‘word-spacing’ and adjustments due to attributes ‘dx’ and ‘dy’ on ‘tspan’ elements. For non-rendering environments, the user agent shall make reasonable assumptions about glyph metrics.

[DOMName("getComputedTextLength")]
public float GetComputedTextLength()

Returns

float

The text advance distance.

GetNumberOfChars()

Returns the total number of characters available for rendering within the current element, which includes referenced characters from ‘tref’ reference, regardless of whether they will be rendered. Effectively, this is equivalent to the length of the Node::textContent attribute from DOM Level 3 Core ([DOM3], section 1.4), if that attribute also expanded ‘tref’ elements.

[DOMName("getNumberOfChars")]
public long GetNumberOfChars()

Returns

long

Total number of characters.

See Also

SVGElement