Table of Contents

Method Convert

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

Convert(string)

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

public bool Convert(string svgFileName)

Parameters

svgFileName string

The full path of the SVG source file.

Returns

bool

This returns true if the conversion is successful; otherwise, it return false.

Exceptions

ArgumentNullException

If the svgFileName is null.

ArgumentException

If the svgFileName is empty.

-or-

If the svgFileName does not exists.

Convert(string, string)

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

public bool Convert(string svgFileName, string imageFileName)

Parameters

svgFileName string

The full path of the SVG source file.

imageFileName string

The output image file. This is optional. If not specified, an image file is created in the same directory as the SVG file.

Returns

bool

This returns true if the conversion is successful; otherwise, it return false.

Exceptions

ArgumentNullException

If the svgFileName is null.

ArgumentException

If the svgFileName is empty.

-or-

If the svgFileName does not exists.

Convert(Stream, string)

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

public bool Convert(Stream svgStream, string imageFileName)

Parameters

svgStream Stream

A stream providing access to the SVG source data.

imageFileName string

The output image file. This is optional. If not specified, an image file is created in the same directory as the SVG file.

Returns

bool

This returns true if the conversion is successful; otherwise, it return false.

Exceptions

ArgumentNullException

If the imageFileName is null.

-or-

If the svgStream is null.
ArgumentException

If the imageFileName is empty.

Convert(TextReader, string)

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

public bool Convert(TextReader svgTextReader, string imageFileName)

Parameters

svgTextReader TextReader

A text reader providing access to the SVG source data.

imageFileName string

The output image file. This is optional. If not specified, an image file is created in the same directory as the SVG file.

Returns

bool

This returns true if the conversion is successful; otherwise, it return false.

Exceptions

ArgumentNullException

If the imageFileName is null.

-or-

If the svgTextReader is null.
ArgumentException

If the imageFileName is empty.

Convert(XmlReader, string)

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

public bool Convert(XmlReader svgXmlReader, string imageFileName)

Parameters

svgXmlReader XmlReader

An XML reader providing access to the SVG source data.

imageFileName string

The output image file. This is optional. If not specified, an image file is created in the same directory as the SVG file.

Returns

bool

This returns true if the conversion is successful; otherwise, it return false.

Exceptions

ArgumentNullException

If the imageFileName is null.

-or-

If the svgXmlReader is null.
ArgumentException

If the imageFileName is empty.