Table of Contents

Class SVGRender

Namespace
SVGImage.SVG
Assembly
DotNetProjects.SVGImage.dll

This is the class that creates the WPF Drawing object based on the information from the SVG class.

public class SVGRender
Inheritance
SVGRender
Inherited Members

Constructors

SVGRender()

public SVGRender()

SVGRender(IExternalFileLoader)

public SVGRender(IExternalFileLoader fileLoader)

Parameters

fileLoader IExternalFileLoader

Properties

AnimationWarnings

public IList<string> AnimationWarnings { get; }

Property Value

IList<string>

CustomBrushes

public Dictionary<string, Brush> CustomBrushes { get; set; }

Property Value

Dictionary<string, Brush>

ExternalFileLoader

public IExternalFileLoader ExternalFileLoader { get; set; }

Property Value

IExternalFileLoader

OverrideColor

public Color? OverrideColor { get; set; }

Property Value

Color?

OverrideFillColor

public Color? OverrideFillColor { get; set; }

Property Value

Color?

OverrideStrokeColor

public Color? OverrideStrokeColor { get; set; }

Property Value

Color?

OverrideStrokeWidth

public double? OverrideStrokeWidth { get; set; }

Property Value

double?

RasterizationScale

Filter pixels per SVG user unit, capped at 2048 pixels per side. Lighting without kernelUnitLength depends on this sampling resolution.

public double RasterizationScale { get; set; }

Property Value

double

SVG

public SVG SVG { get; }

Property Value

SVG

UseAnimations

public bool UseAnimations { get; set; }

Property Value

bool

UseFilters

Applies SVG filter effects. Disable for a fast preview, then enable and recreate the drawing for full quality.

public bool UseFilters { get; set; }

Property Value

bool

Methods

CreateDrawing(SVG)

public DrawingGroup CreateDrawing(SVG svg)

Parameters

svg SVG

Returns

DrawingGroup

CreateDrawing(Shape)

public DrawingGroup CreateDrawing(Shape shape)

Parameters

shape Shape

Returns

DrawingGroup

LoadDrawing(Stream)

public DrawingGroup LoadDrawing(Stream stream)

Parameters

stream Stream

Returns

DrawingGroup

LoadDrawing(TextReader)

public DrawingGroup LoadDrawing(TextReader txtReader)

Parameters

txtReader TextReader

Returns

DrawingGroup

LoadDrawing(string)

public DrawingGroup LoadDrawing(string filename)

Parameters

filename string

Returns

DrawingGroup

LoadDrawing(Uri)

public DrawingGroup LoadDrawing(Uri fileUri)

Parameters

fileUri Uri

Returns

DrawingGroup

LoadDrawing(XmlReader)

public DrawingGroup LoadDrawing(XmlReader xmlReader)

Parameters

xmlReader XmlReader

Returns

DrawingGroup

LoadXmlDrawing(string)

public DrawingGroup LoadXmlDrawing(string fileXml)

Parameters

fileXml string

Returns

DrawingGroup

SeekAnimations(TimeSpan)

Stops playback and evaluates the current scene at an exact time.

public void SeekAnimations(TimeSpan position)

Parameters

position TimeSpan

TriggerAnimationEvent(string, string)

Forwards a named SVG event, for example an element's click, to SMIL timing.

public void TriggerAnimationEvent(string elementId, string eventName = "click")

Parameters

elementId string
eventName string

See Also