Table of Contents

Interface ISvgElement

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

Interface for all SVG elements.
ID2D1SvgElement

public interface ISvgElement : IDirect2DResource, IObjectRef, IIsDisposed, IDisposable, IFactoryProperty, IInternalImpl
Inherited Members
Extension Methods

Properties

HasChildren

Returns a boolean indicating whether this element has children.

IsTextContent

Returns a boolean indicating whether this element represents text content, e.g. the content of a 'title' or 'desc' element. Text content does not have a tag name.

SpecifiedAttributeCount

Returns the number of specified attributes on this element. Attributes are only considered specified if they are explicitly set on the element or present within an inline style. Properties that receive their value through CSS inheritance are not considered specified. An attribute can become specified if it is set through a method call. It can become unspecified if it is removed via RemoveAttribute.

TagName

Gets the tag name.

TextValue

Gets or sets the value of a text content element.

Methods

AppendChild(ISvgElement)

Appends an element to the list of children. If the element already has a parent, it is removed from this parent as part of the append operation.

CreateChild(string)

Creates an element from a tag name. The element is appended to the list of children.

GetAttributeValue(string, SvgAttributePodType, Span<byte>)

Gets an attribute of this element as a POD (plain old data) type.

GetAttributeValue(string, SvgAttributeStringType)

Gets an attribute of this element as a string.

GetAttributeValueRef(string, Type)

Gets an attribute of this element as an object reference.

GetDocument()

Gets the document that contains this element.

GetFirstChild()

Gets the first child of this element.

GetLastChild()

Gets the last child of this element.

GetNextChild(ISvgElement)

Gets the next sibling of the referenceChild element.

GetParent()

Gets the parent element.

GetPreviousChild(ISvgElement)

Gets the previous sibling of the referenceChild element.

GetSpecifiedAttributeName(int, out bool)

Gets the name of the attribute at the given index.

InsertChildBefore(ISvgElement, ISvgElement?)

Inserts newChild as a child of this element, before the referenceChild element. If the newChild element already has a parent, it is removed from this parent as part of the insertion.

IsAttributeSpecified(string, out bool)

Returns a boolean indicating if the attribute is explicitly set on the element.

RemoveAttribute(string)

Removes the attribute from this element. Also removes this attribute from within an inline style if present.

RemoveChild(ISvgElement)

Removes the oldChild from the tree. Children of oldChild remain children of oldChild.

ReplaceChild(ISvgElement, ISvgElement)

Replaces the oldChild element with the newChild. This operation removes the oldChild from the tree. If the newChild element already has a parent, it is removed from this parent as part of the replace operation.

SetAttributeValue(string, ISvgAttribute)

Sets an attribute of this element using an object reference. A given attribute object may only set on one element in one attribute location at a time.

SetAttributeValue(string, SvgAttributePodType, ReadOnlySpan<byte>)

Sets an attribute of this element using a POD (plain old date) type.

SetAttributeValue(string, SvgAttributeStringType, string)

Sets an attribute of this element using a string.

TryGetAttributeValue(string, SvgAttributePodType, Span<byte>)

Gets an attribute of this element as a POD (plain old data) type.

TryGetAttributeValue(string, SvgAttributeStringType, out string?)

Gets an attribute of this element as a string.

TryGetAttributeValueRef(string, Type, out IObjectRef?)

Gets an attribute of this element as an object reference.