public void Execute(ICanvas canvas) { var rectangeCoordinates = new CoordinateParser().Parse(Input); var rectangle = new Rectangle(rectangeCoordinates.StartPoint(), rectangeCoordinates.EndPoint()); canvas.DrawRectangle(rectangle); }
public void Execute(ICanvas canvas) { var lineCoordinates = new CoordinateParser().Parse(Input); var line = new Line(lineCoordinates.StartPoint(), lineCoordinates.EndPoint()); canvas.DrawLine(line); }