Esempio n. 1
0
        public void Execute(ICanvas canvas)
        {
            var rectangeCoordinates = new CoordinateParser().Parse(Input);
            var rectangle           = new Rectangle(rectangeCoordinates.StartPoint(), rectangeCoordinates.EndPoint());

            canvas.DrawRectangle(rectangle);
        }
Esempio n. 2
0
        public void Execute(ICanvas canvas)
        {
            var lineCoordinates = new CoordinateParser().Parse(Input);
            var line            = new Line(lineCoordinates.StartPoint(), lineCoordinates.EndPoint());

            canvas.DrawLine(line);
        }