Ejemplo n.º 1
0
 public void TurtleGraphics()
 {
     var p = new Path ();
     p.MoveTo (new Point (100, 200), false);
     p.LineTo (new Point (200, 250));
     p.LineTo (new Point (100, 300));
     p.Close ();
 }
Ejemplo n.º 2
0
        public void Contains()
        {
            var p = new Path ();
            p.MoveTo (new Point (0, 0), false);
            p.LineTo (new Point (100, 0));
            p.LineTo (new Point (100, 50));
            p.Close ();

            Assert.False (p.Contains (new Point (0, 1)));
            Assert.True (p.Contains (new Point (0, 0)));
            Assert.True (p.Contains (new Point (99, 49)));
            Assert.False (p.Contains (new Point (50, 49)));
        }
Ejemplo n.º 3
0
		public async Task TriWithRadGrad ()
		{
			var canvas = Platform.CreateImageCanvas (new Size (100), transparency: true);
			var size = new Size (100);
			var b = new RadialGradientBrush (
				new Point (0.5, 1), new Size(1),
				Colors.Yellow, Colors.Blue);
			var p = new Path ();
			p.MoveTo (0, 0, false);
			p.LineTo (size.Width, 0,false);
			p.LineTo (size.Width / 2, size.Height,false);
			p.Close ();
			p.Brush = b;
			p.Draw (canvas);
      await SaveImage(canvas, "ImageCanvas.TriWithRadGrad");
		}