Пример #1
0
        public static Bitmap GetBitmap(string svgString, int width, int height, out List <Attributes> SvgAttributes,
                                       ISvgColorMapper colorMapper = null, bool isStecil = false)
        {
            var svg = SVGParser.ParseSVGFromString(svgString, colorMapper, out SvgAttributes, isStecil);

            return(MakeBitmapFromSvg(svg, width, height));
        }
Пример #2
0
		public static PictureBitmapDrawable GetDrawable (Android.Content.Res.Resources resources,
		                                                 int resID,
		                                                 ISvgColorMapper colorMapper = null)
		{
			var svg = SVGParser.ParseSVGFromResource (resources, resID, colorMapper);
			return new PictureBitmapDrawable (svg.Picture);
		}
Пример #3
0
        public static Bitmap GetBitmap(TextReader reader, int width, int height,
                                       ISvgColorMapper colorMapper = null)
        {
            var svg = SVGParser.ParseSvgFromReader(reader, colorMapper);

            return(MakeBitmapFromSvg(svg, width, height));
        }
Пример #4
0
        public static Bitmap GetBitmap(Stream stream, int width, int height,
                                       ISvgColorMapper colorMapper = null)
        {
            var svg = SVGParser.ParseSvgFromStream(stream, colorMapper);

            return(MakeBitmapFromSvg(svg, width, height));
        }
Пример #5
0
        public static PictureBitmapDrawable GetDrawable(Android.Content.Res.Resources resources,
                                                        int resID,
                                                        ISvgColorMapper colorMapper = null)
        {
            var svg = SVGParser.ParseSVGFromResource(resources, resID, colorMapper);

            return(new PictureBitmapDrawable(svg.Picture));
        }
Пример #6
0
		public static Bitmap GetBitmap (Android.Content.Res.Resources resources,
		                                int resID,
		                                int width, int height,
		                                ISvgColorMapper colorMapper = null)
		{
			var svg = SVGParser.ParseSVGFromResource (resources, resID, colorMapper);
			return MakeBitmapFromSvg (svg, width, height);
		}
Пример #7
0
        public static Bitmap GetBitmap(Android.Content.Res.Resources resources,
                                       int resID,
                                       int width, int height,
                                       ISvgColorMapper colorMapper = null)
        {
            var svg = SVGParser.ParseSVGFromResource(resources, resID, colorMapper);

            return(MakeBitmapFromSvg(svg, width, height));
        }
Пример #8
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);
     }
 }
Пример #9
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);
     }
 }
Пример #10
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);
			}
		}
Пример #11
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);
     }
 }
Пример #12
0
		public static Svg ParseSvgFromAsset (AssetManager pAssetManager, string pAssetPath, ISvgColorMapper pSVGColorMapper)
		{
			using (var stream = pAssetManager.Open (pAssetPath))
				return ParseSvgFromStream (stream, pSVGColorMapper);
		}
Пример #13
0
		public static Bitmap GetBitmap (string svgString, int width, int height,
		                                ISvgColorMapper colorMapper = null)
		{
			var svg = SVGParser.ParseSVGFromString (svgString, colorMapper);
			return MakeBitmapFromSvg (svg, width, height);
		}
Пример #14
0
		public static Bitmap GetBitmap (TextReader reader, int width, int height,
		                                ISvgColorMapper colorMapper = null)
		{
			var svg = SVGParser.ParseSvgFromReader (reader, colorMapper);
			return MakeBitmapFromSvg (svg, width, height);
		}
Пример #15
0
 public SVGHandler(Picture pPicture, ISvgColorMapper pSVGColorMapper)
 {
     this.mPicture  = pPicture;
     this.mSVGPaint = new SVGPaint(pSVGColorMapper);
 }
Пример #16
0
        public static Svg ParseSvgFromReader(TextReader reader, ISvgColorMapper pSVGColorMapper)
        {
            List <Attributes> SvgAttributes;

            return(ParseSvgFromReader(reader, pSVGColorMapper, out SvgAttributes, false));
        }
Пример #17
0
 public static Svg ParseSVGFromString(string pString, ISvgColorMapper pSVGColorMapper, out List <Attributes> SvgAttributes, bool isStecil = false)
 {
     return(ParseSvgFromReader(new StringReader(pString), pSVGColorMapper, out SvgAttributes, isStecil));
 }
Пример #18
0
		public static Bitmap GetBitmap (Stream stream, int width, int height,
		                                ISvgColorMapper colorMapper = null)
		{
			var svg = SVGParser.ParseSvgFromStream (stream, colorMapper);
			return MakeBitmapFromSvg (svg, width, height);
		}
Пример #19
0
		public static PictureBitmapDrawable GetDrawable (string svgString, ISvgColorMapper colorMapper = null)
		{
			var svg = SVGParser.ParseSVGFromString (svgString, colorMapper);
			return new PictureBitmapDrawable (svg.Picture);
		}
Пример #20
0
 public static Svg ParseSVGFromString(string pString, ISvgColorMapper pSVGColorMapper)
 {
     return(ParseSvgFromReader(new StringReader(pString), pSVGColorMapper));
 }
Пример #21
0
 public static Svg ParseSvgFromAsset(AssetManager pAssetManager, string pAssetPath, ISvgColorMapper pSVGColorMapper)
 {
     using (var stream = pAssetManager.Open(pAssetPath))
         return(ParseSvgFromStream(stream, pSVGColorMapper));
 }
Пример #22
0
        public static PictureBitmapDrawable GetDrawable(TextReader reader, ISvgColorMapper colorMapper = null)
        {
            var svg = SVGParser.ParseSvgFromReader(reader, colorMapper);

            return(new PictureBitmapDrawable(svg.Picture));
        }
Пример #23
0
		public static PictureBitmapDrawable GetDrawable (TextReader reader, ISvgColorMapper colorMapper = null)
		{
			var svg = SVGParser.ParseSvgFromReader (reader, colorMapper);
			return new PictureBitmapDrawable (svg.Picture);
		}
Пример #24
0
		public static Svg ParseSVGFromResource (Resources pResources, int pRawResourceID, ISvgColorMapper pSVGColorMapper)
		{
			return ParseSvgFromStream(pResources.OpenRawResource (pRawResourceID), pSVGColorMapper);
		}
Пример #25
0
		public static Svg ParseSVGFromString (string pString, ISvgColorMapper pSVGColorMapper)
		{
			return ParseSvgFromReader(new StringReader(pString), pSVGColorMapper);
		}
Пример #26
0
		public static PictureBitmapDrawable GetDrawable (Stream stream, ISvgColorMapper colorMapper = null)
		{
			var svg = SVGParser.ParseSvgFromStream (stream, colorMapper);
			return new PictureBitmapDrawable (svg.Picture);
		}
Пример #27
0
        public static PictureBitmapDrawable GetDrawable(string svgString, ISvgColorMapper colorMapper = null)
        {
            var svg = SVGParser.ParseSVGFromString(svgString, colorMapper);

            return(new PictureBitmapDrawable(svg.Picture));
        }
Пример #28
0
		public static Svg ParseSvgFromStream(Stream pInputStream, ISvgColorMapper pSVGColorMapper)
		{
			return ParseSvgFromReader (new StreamReader (pInputStream), pSVGColorMapper);
		}
Пример #29
0
        public static PictureBitmapDrawable GetDrawable(Stream stream, ISvgColorMapper colorMapper = null)
        {
            var svg = SVGParser.ParseSvgFromStream(stream, colorMapper);

            return(new PictureBitmapDrawable(svg.Picture));
        }
Пример #30
0
 public SVGHandler(Picture pPicture, ISvgColorMapper pSVGColorMapper)
 {
     this.mPicture  = pPicture;
     this.mSVGPaint = new SVGPaint(pSVGColorMapper);
     //this.mSVGPaint.isStancil = true;
 }
Пример #31
0
 public static Svg ParseSVGFromResource(Resources pResources, int pRawResourceID, ISvgColorMapper pSVGColorMapper)
 {
     return(ParseSvgFromStream(pResources.OpenRawResource(pRawResourceID), pSVGColorMapper));
 }
Пример #32
0
 public SVGHandler(Picture pPicture, ISvgColorMapper pSVGColorMapper, bool isStencil)
 {
     this.mPicture            = pPicture;
     this.mSVGPaint           = new SVGPaint(pSVGColorMapper);
     this.mSVGPaint.isStancil = isStencil;
 }
Пример #33
0
 public static Svg ParseSvgFromStream(Stream pInputStream, ISvgColorMapper pSVGColorMapper)
 {
     return(ParseSvgFromReader(new StreamReader(pInputStream), pSVGColorMapper));
 }
Пример #34
0
		public SVGPaint(ISvgColorMapper pSVGColorMapper) {
			this.mSVGColorMapper = pSVGColorMapper;
		}
Пример #35
0
 public SVGPaint(ISvgColorMapper pSVGColorMapper)
 {
     this.mSVGColorMapper = pSVGColorMapper;
 }
Пример #36
0
		public SVGHandler(Picture pPicture, ISvgColorMapper pSVGColorMapper) {
			this.mPicture = pPicture;
			this.mSVGPaint = new SVGPaint(pSVGColorMapper);
		}