Table of Contents

Class ImageSvgConverter

Namespace
SharpVectors.Converters
Assembly
SharpVectors.Converters.Wpf.dll

This converts the SVG file to static or bitmap image, which is saved to a file.

public sealed class ImageSvgConverter : SvgConverter, IDisposable
Inheritance
ImageSvgConverter
Implements
Inherited Members

Remarks

The image is save with the Pbgra32 format, since that is the only pixel format which does not throw an exception with the RenderTargetBitmap.

The DPI used is 96.

Constructors

ImageSvgConverter(WpfDrawingSettings)

Initializes a new instance of the ImageSvgConverter class with the specified drawing or rendering settings.

ImageSvgConverter(bool, bool, WpfDrawingSettings)

Initializes a new instance of the ImageSvgConverter class with the specified drawing or rendering settings and the saving options.

Properties

Drawing

Gets the last created drawing.

Encoder

Gets or sets a custom bitmap encoder to use in encoding the drawing to an image file.

EncoderType

Gets or set the bitmap encoder type to use in encoding the drawing to an image file.

FallbackOnWriterError

Gets or sets a value indicating whether to fall back and use the .NET Framework image writer when an error occurred in using the custom writer.

WriterErrorOccurred

Gets a value indicating whether a writer error occurred when using the custom image writer.

XamlFile

Gets the output XAML file path if generated.

ZamlFile

Gets the output ZAML file path if generated.

Methods

Convert(Stream, string)

This performs the conversion of the specified SVG source, and saves the output to the specified image file.

Convert(TextReader, string)

This performs the conversion of the specified SVG source, and saves the output to the specified image file.

Convert(string)

This performs the conversion of the specified SVG file, and saves the output to an image file with the same file name.

Convert(string, string)

This performs the conversion of the specified SVG file, and saves the output to the specified image file.

Convert(XmlReader, string)

This performs the conversion of the specified SVG source, and saves the output to the specified image file.