Пример #1
0
 public override Container GetBounds()
 {
     return(new Container()
     {
         TopLeft = TopLeft.Clone(),
         BottomRight = BottomRight.Clone()
     });
 }
Пример #2
0
        public object Clone()
        {
            var rectangle = (Rectangle)MemberwiseClone();

            rectangle.TopLeft  = (Point)TopLeft.Clone();
            rectangle.BotRight = (Point)BotRight.Clone();

            return(rectangle);
        }
Пример #3
0
 public override Shape DeepClone()
 {
     return(new FilledRectangle(TopLeft.Clone(), BottomRight.Clone(), Width, Color));
 }