Esempio n. 1
0
        private void DrawPoint(Point p, Brush stroke)
        {
            Rectangle rect = new Rectangle();

            rect.Stroke = stroke;
            //rect.Fill = new SolidColorBrush(Colors.Black);
            rect.Width  = 2;
            rect.Height = 2;
            Canvas.SetLeft(rect, p.x);
            Canvas.SetTop(rect, p.y);
            this.MainWindowCanvas.Children.Add(rect);
        }
Esempio n. 2
0
        private void DrawLine(Point start, Point end)
        {
            Line l = new Line();

            l.Stroke = Brushes.LightSteelBlue;

            l.X1 = start.x;
            l.X2 = end.x;
            l.Y1 = start.y;
            l.Y2 = end.y;

            l.StrokeThickness = 2;
            this.MainWindowCanvas.Children.Add(l);
        }
Esempio n. 3
0
 private void DrawPoint(Point p)
 {
     DrawPoint(p, new SolidColorBrush(Colors.Red));
 }