public Polyline(Point[] points) { _vertices = new List <Vertex>(); foreach (Point p in points) { _vertices.Add(new Vertex(p)); } _mover = new PolylineMover(this); _pen = new Pen(Color.Cyan); }
public Polyline(int n, int canvasWidth, int canvasHeight) { if (n < 3) { throw new ArgumentException("number of vertices in the polyline should be >= 3"); } RandomVerticesGenerator random = new RandomVerticesGenerator(canvasWidth, canvasHeight); _vertices = random.Next(n); _pen = new Pen(Color.Cyan); _mover = new PolylineMover(this); }