Exemplo n.º 1
0
        public static void DrawPath(this ICanvas canvas, Action <Path> draw, Pen pen = null, Brush brush = null)
        {
            var p = new Path(pen, brush);

            draw(p);
            p.Draw(canvas);
        }
Exemplo n.º 2
0
        public static void FillPath(this ICanvas canvas, Action <Path> draw, Brush brush)
        {
            var p = new Path(null, brush);

            draw(p);
            p.Draw(canvas);
        }
Exemplo n.º 3
0
 public static void DrawLine(this ICanvas canvas, double x1, double y1, double x2, double y2, Color color, double width = 1.0)
 {
     var p = new Path { Pen = new Pen (color, width) };
     p.MoveTo (x1, y1);
     p.LineTo (x2, y2);
     p.Draw (canvas);
 }
Exemplo n.º 4
0
 public static void DrawLine(this ICanvas canvas, Point start, Point end, Color color, double width = 1.0)
 {
     var p = new Path { Pen = new Pen (color, width) };
     p.MoveTo (start);
     p.LineTo (end);
     p.Draw (canvas);
 }
Exemplo n.º 5
0
 public static void DrawLine(this ICanvas canvas, Point start, Point end, Pen pen)
 {
     var p = new Path { Pen = pen };
     p.MoveTo (start);
     p.LineTo (end);
     p.Draw (canvas);
 }
Exemplo n.º 6
0
        public static void DrawLine(this ICanvas canvas, double x1, double y1, double x2, double y2, Color color, double width = 1.0)
        {
            var p = new Path {
                Pen = new Pen(color, width)
            };

            p.MoveTo(x1, y1);
            p.LineTo(x2, y2);
            p.Draw(canvas);
        }
Exemplo n.º 7
0
        public static void DrawLine(this ICanvas canvas, Point start, Point end, Color color, double width = 1.0)
        {
            var p = new Path {
                Pen = new Pen(color, width)
            };

            p.MoveTo(start);
            p.LineTo(end);
            p.Draw(canvas);
        }
Exemplo n.º 8
0
        public static void DrawLine(this ICanvas canvas, Point start, Point end, Pen pen)
        {
            var p = new Path {
                Pen = pen
            };

            p.MoveTo(start);
            p.LineTo(end);
            p.Draw(canvas);
        }
Exemplo n.º 9
0
 public static void DrawPath(this ICanvas canvas, Action<Path> draw, Pen pen = null, Brush brush = null)
 {
     var p = new Path (pen, brush);
     draw (p);
     p.Draw (canvas);
 }
Exemplo n.º 10
0
 public static void FillPath(this ICanvas canvas, Action<Path> draw, Brush brush)
 {
     var p = new Path (null, brush);
     draw (p);
     p.Draw (canvas);
 }