VectSharp 2.5.0
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.SVG.Parser Class Reference

Contains methods to read an SVG image file. More...

Static Public Member Functions

static Page ParseSVGURI (string uri, bool ignored=false)
 Parses an SVG image URI. More...
 
static Page FromString (string svgSource)
 Parses SVG source into a Page containing the image represented by the code. More...
 
static Page FromFile (string fileName)
 Parses an SVG image file into a Page containing the image. More...
 
static Page FromStream (Stream svgSourceStream)
 Parses an stream containing SVG source code into a Page containing the image represented by the code. More...
 

Static Public Attributes

static Func< string, bool, PageParseImageURI
 A function that takes as input an image URI and a boolean value indicating whether the image should be interpolated, and returns a Page object containing the image. By default, this is equal to ParseSVGURI, i.e. it is only able to parse SVG images. If you wish to enable the parsing of other formats, you should install the "VectSharp.MuPDFUtils" NuGet package and enable the parser in your program by doing something like: More...
 

Detailed Description

Contains methods to read an SVG image file.

Definition at line 35 of file SVGParser.cs.

Member Function Documentation

◆ FromFile()

static Page VectSharp.SVG.Parser.FromFile ( string  fileName)
static

Parses an SVG image file into a Page containing the image.

Parameters
fileNameThe path to the SVG image file.
Returns
A Page containing the image represented by the file.

Definition at line 200 of file SVGParser.cs.

◆ FromStream()

static Page VectSharp.SVG.Parser.FromStream ( Stream  svgSourceStream)
static

Parses an stream containing SVG source code into a Page containing the image represented by the code.

Parameters
svgSourceStreamThe stream containing SVG source code.
Returns
A Page containing the image represented by the svgSourceStream .

Definition at line 210 of file SVGParser.cs.

◆ FromString()

static Page VectSharp.SVG.Parser.FromString ( string  svgSource)
static

Parses SVG source into a Page containing the image represented by the code.

Parameters
svgSourceThe SVG source code.
Returns
A Page containing the image represented by the svgSource .

Definition at line 118 of file SVGParser.cs.

◆ ParseSVGURI()

static Page VectSharp.SVG.Parser.ParseSVGURI ( string  uri,
bool  ignored = false 
)
static

Parses an SVG image URI.

Parameters
uriThe image URI to parse.
ignoredThis value is ignored and is only needed for compatibility.
Returns
A Page containing the parsed SVG image, or null.

Definition at line 56 of file SVGParser.cs.

Member Data Documentation

◆ ParseImageURI

Func<string, bool, Page> VectSharp.SVG.Parser.ParseImageURI
static

A function that takes as input an image URI and a boolean value indicating whether the image should be interpolated, and returns a Page object containing the image. By default, this is equal to ParseSVGURI, i.e. it is only able to parse SVG images. If you wish to enable the parsing of other formats, you should install the "VectSharp.MuPDFUtils" NuGet package and enable the parser in your program by doing something like:

VectSharp.SVG.Parser.ParseImageURI = VectSharp.MuPDFUtils.ImageURIParser.Parser(VectSharp.SVG.Parser.ParseSVGURI);

Definition at line 48 of file SVGParser.cs.


The documentation for this class was generated from the following file: