示例#1
0
 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);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
 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);
     }
 }
示例#4
0
		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);
			}
		}