public static Svg ParseSvgFromReader(TextReader reader, ISvgColorMapper pSVGColorMapper) { try { var xmlReader = XmlReader.Create(reader); Picture picture = new Picture(); var svgHandler = new SVGHandler(picture, pSVGColorMapper); svgHandler.Parse(xmlReader); Svg svg = new Svg(picture, svgHandler.getBounds(), svgHandler.getComputedBounds()); return(svg); } catch (Exception e) { throw new SVGParseException(e); } }
public static Svg ParseSvgFromReader(TextReader reader, ISvgColorMapper pSVGColorMapper) { try { var xmlReader = XmlReader.Create (reader); Picture picture = new Picture(); var svgHandler = new SVGHandler (picture, pSVGColorMapper); svgHandler.Parse (xmlReader); Svg svg = new Svg(picture, svgHandler.getBounds(), svgHandler.getComputedBounds()); return svg; } catch (Exception e) { throw new SVGParseException(e); } }
public static Svg ParseSvgFromReader(TextReader reader, ISvgColorMapper pSVGColorMapper) { try { var readerSettings = new XmlReaderSettings(); readerSettings.XmlResolver = null; readerSettings.DtdProcessing = DtdProcessing.Ignore; var xmlReader = XmlReader.Create(reader, readerSettings); Picture picture = new Picture(); var svgHandler = new SVGHandler(picture, pSVGColorMapper); svgHandler.Parse(xmlReader); Svg svg = new Svg(picture, svgHandler.getBounds(), svgHandler.getComputedBounds()); return(svg); } catch (Exception e) { throw new SVGParseException(e); } }
public static Svg ParseSvgFromReader (TextReader reader, ISvgColorMapper pSVGColorMapper) { try { var readerSettings = new XmlReaderSettings(); readerSettings.XmlResolver = null; readerSettings.DtdProcessing = DtdProcessing.Ignore; var xmlReader = XmlReader.Create (reader, readerSettings); Picture picture = new Picture(); var svgHandler = new SVGHandler (picture, pSVGColorMapper); svgHandler.Parse (xmlReader); Svg svg = new Svg(picture, svgHandler.getBounds(), svgHandler.getComputedBounds()); return svg; } catch (Exception e) { throw new SVGParseException(e); } }