public void DrawEllipse(Painter.Shapes.Point center, double w, double h) { var ellipse = new Ellipse { Width = w, Height = h, Stroke = ToColor(), }; System.Windows.Controls.Canvas.SetLeft(ellipse, center.X - w / 2); System.Windows.Controls.Canvas.SetTop(ellipse, center.Y - h / 2); _canvas.Children.Add(ellipse); }
public void DrawLine(Painter.Shapes.Point from, Painter.Shapes.Point to) { var line = new Line { X1 = from.X, Y1 = from.Y, X2 = to.X, Y2 = to.Y, Stroke = ToColor() }; _canvas.Children.Add(line); }