Example #1
0
 void DrawGraphic()
 {
     var c = new GraphicCanvas (size);
     if (func != null)
         func (c);
     graphic = c.Graphic;
 }
Example #2
0
		void DrawGraphic ()
		{
			var c = new GraphicCanvas (size, textPlatform);
			if (func != null)
				func (c);
			graphic = c.Graphic;
		}
Example #3
0
        void DrawGraphic()
        {
            var c = new GraphicCanvas(size, textPlatform);

            if (func != null)
            {
                func(c);
            }
            graphic = c.Graphic;
        }
		public async Task SaveSvg (GraphicCanvas canvas, string name)
		{
			var path = GetPath (name, ".svg");
			using (var s = OpenStream (path)) {
				if (s == null) {
					using (var ss = await Platforms.Current.OpenFileStreamForWritingAsync (path)) {
						using (var w = new System.IO.StreamWriter (ss)) {
							canvas.Graphic.WriteSvg (w);
						}
					}
				}
				else {
					var w = new System.IO.StreamWriter (s);
					canvas.Graphic.WriteSvg (w);
					await w.FlushAsync ();
					await CloseStream (s);
				}
			}
		}