Class SVGParser
Reads an SVG document and builds a vector scene.
Inheritance
System.Object
SVGParser
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Unity.VectorGraphics
Syntax
public class SVGParser
Methods
ImportSVG(TextReader, Single, Single, Int32, Int32)
Kicks off an SVG file import.
Declaration
public static SVGParser.SceneInfo ImportSVG(TextReader textReader, float dpi = 0F, float pixelsPerUnit = 1F, int windowWidth = 0, int windowHeight = 0)
Parameters
Type | Name | Description |
---|---|---|
TextReader | textReader | |
System.Single | dpi | The DPI of the SVG file, or 0 to use the device's DPI |
System.Single | pixelsPerUnit | How many SVG units fit in a Unity unit |
System.Int32 | windowWidth | The default with of the viewport, may be 0 |
System.Int32 | windowHeight | The default height of the viewport, may be 0 |
Returns
Type | Description |
---|---|
SVGParser.SceneInfo | A SceneInfo object containing the scene data |