PeachBrackets
PeachBrackets.Building.SvgImage
SvgImage.Parse Method
| Overloads | |
|---|---|
| Parse(byte[], RenderContext) | Parses SVG markup from bytes (UTF-8, or whatever a byte-order mark says). |
| Parse(string, RenderContext) | Parses SVG markup. |
SvgImage.Parse(byte[], RenderContext) Method
Parses SVG markup from bytes (UTF-8, or whatever a byte-order mark says).
public static PeachBrackets.Building.SvgImage Parse(byte[] svgBytes, PeachDrawing.Core.RenderContext renderContext);
Parameters
svgBytes System.Byte[]
the encoded SVG document
renderContext RenderContext
the context that resolves the fonts and colours the image uses
Returns
SvgImage
the parsed image
Exceptions
System.Xml.XmlException
the markup is not well-formed XML
SvgImage.Parse(string, RenderContext) Method
Parses SVG markup.
public static PeachBrackets.Building.SvgImage Parse(string svgMarkup, PeachDrawing.Core.RenderContext renderContext);
Parameters
svgMarkup System.String
an XML document whose root is an <svg> element
renderContext RenderContext
the context that resolves the fonts and colours the image uses
Returns
SvgImage
the parsed image
Exceptions
System.Xml.XmlException
the markup is not well-formed XML