Ejemplo n.º 1
0
        public void VisitRectangle(Rectangle rect)
        {
            var x      = (int)_params[0];
            var y      = (int)_params[1];
            var width  = (int)_params[2];
            var height = (int)_params[3];
            var color  = (Color)_params[4];

            rect.Accept(new ReplaceShape(x, y));
            rect.Width  = width;
            rect.Height = height;
            rect.Color  = color;
        }
Ejemplo n.º 2
0
 public void UpdateRectangle(Rectangle r, int x, int y, int width, int height, Color color)
 {
     r.Accept(new UpdateShape(x, y, width, height, color));
     CreateMemento();
 }