Class SvgImage
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
SVG document rendered natively by Direct2D (ID2D1SvgDocument, Windows 10 1703+).
public sealed class SvgImage
- Inheritance
-
SvgImage
- Inherited Members
Remarks
Direct2D supports the static SVG 1.1 subset (shapes, paths, gradients, transforms, groups, clip paths); no text, filters, scripts or animations. When the platform cannot render SVG, a neutral placeholder is drawn.
Properties
Data
UTF-8 SVG markup.
public byte[] Data { get; }
Property Value
- byte[]
IntrinsicSize
Size declared by the document (width/height or viewBox), 100×100 if none.
public Size IntrinsicSize { get; }
Property Value
Methods
FromFile(string)
Loads an SVG file.
public static SvgImage FromFile(string path)
Parameters
pathstring
Returns
FromResource(Assembly, string)
Loads an embedded SVG resource.
public static SvgImage FromResource(Assembly assembly, string resourceName)
Parameters
Returns
FromString(string)
Loads SVG markup from a string.
public static SvgImage FromString(string svg)
Parameters
svgstring