Table of Contents

Interface ISvgDocument

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

Represents an SVG document.
ID2D1SvgDocument

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

Properties

ViewportSize

Gets or sets the size of the initial viewport.

Methods

CreatePaint(SvgPaintType, ColorRgba128Float, string?)

Creates a paint object which can be used to set the 'fill' or 'stroke' properties.

CreatePathData(ReadOnlySpan<float>, ReadOnlySpan<SvgPathCommand>)

Creates a path data object which can be used to set a 'd' attribute on a 'path' element.

CreatePointCollection(ReadOnlySpan<Point2Float>)

Creates a points object which can be used to set a points attribute on a polygon or polyline element.

CreateStrokeDashArray(ReadOnlySpan<SvgLength>)

Creates a dash array object which can be used to set the stroke-dasharray property.

Deserialize(Stream)

Deserializes a subtree from the stream. The stream must have only one root element, but that root element need not be an 'svg' element. The output element is not inserted into this document tree.

FindElementByID(string)

Gets the SVG element with the specified ID.

GetRoot()

Gets the root element of the document, or null if the document is empty.

Serialize(Stream, ISvgElement?)

Serializes an element and its subtree to XML. The output XML is encoded as UTF-8.

SetRoot(ISvgElement?)

Sets the root element of the document.The root element must be an svg element. If the element already exists within an svg tree, it is first removed.