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

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

            canvas.DrawLine(line);
        }