Class SVGRender
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
fileLoaderIExternalFileLoader
Properties
AnimationWarnings
public IList<string> AnimationWarnings { get; }
Property Value
CustomBrushes
public Dictionary<string, Brush> CustomBrushes { get; set; }
Property Value
ExternalFileLoader
public IExternalFileLoader ExternalFileLoader { get; set; }
Property Value
OverrideColor
public Color? OverrideColor { get; set; }
Property Value
OverrideFillColor
public Color? OverrideFillColor { get; set; }
Property Value
OverrideStrokeColor
public Color? OverrideStrokeColor { get; set; }
Property Value
OverrideStrokeWidth
public double? OverrideStrokeWidth { get; set; }
Property Value
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
SVG
public SVG SVG { get; }
Property Value
UseAnimations
public bool UseAnimations { get; set; }
Property Value
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
Methods
CreateDrawing(SVG)
public DrawingGroup CreateDrawing(SVG svg)
Parameters
svgSVG
Returns
CreateDrawing(Shape)
public DrawingGroup CreateDrawing(Shape shape)
Parameters
shapeShape
Returns
LoadDrawing(Stream)
public DrawingGroup LoadDrawing(Stream stream)
Parameters
streamStream
Returns
LoadDrawing(TextReader)
public DrawingGroup LoadDrawing(TextReader txtReader)
Parameters
txtReaderTextReader
Returns
LoadDrawing(string)
public DrawingGroup LoadDrawing(string filename)
Parameters
filenamestring
Returns
LoadDrawing(Uri)
public DrawingGroup LoadDrawing(Uri fileUri)
Parameters
fileUriUri
Returns
LoadDrawing(XmlReader)
public DrawingGroup LoadDrawing(XmlReader xmlReader)
Parameters
xmlReaderXmlReader
Returns
LoadXmlDrawing(string)
public DrawingGroup LoadXmlDrawing(string fileXml)
Parameters
fileXmlstring
Returns
SeekAnimations(TimeSpan)
Stops playback and evaluates the current scene at an exact time.
public void SeekAnimations(TimeSpan position)
Parameters
positionTimeSpan
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")