Пример #1
0
        public override object Clone()
        {
            PreviewPolyLine newLine = (PreviewPolyLine)this.MemberwiseClone();

            //newLine._pixels = new List<Preview Pixel>();

            foreach (PreviewPixel pixel in _pixels)
            {
                newLine.AddPixel(pixel.X, pixel.Y);
            }
            return(newLine);
        }
Пример #2
0
        public override object Clone()
        {
            PreviewPolyLine newLine = (PreviewPolyLine)this.MemberwiseClone();

            newLine._pixels = new List <PreviewPixel>();

            foreach (PreviewPixel pixel in _pixels)
            {
                newLine._pixels.Add(pixel.Clone());
            }

            newLine._points = new List <PreviewPoint>();
            foreach (var previewPoint in _points)
            {
                newLine._points.Add(previewPoint.Copy());
            }
            return(newLine);
        }