示例#1
0
        public override void Match(PreviewBaseShape matchShape)
        {
            PreviewIcicle shape = (matchShape as PreviewIcicle);

            PixelSize    = shape.PixelSize;
            _points[1].X = _points[0].X + (shape._points[1].X - shape._points[0].X);
            _points[1].Y = _points[0].Y + (shape._points[1].Y - shape._points[0].Y);
            Layout();
        }
示例#2
0
        public override object Clone()
        {
            PreviewIcicle newLine = (PreviewIcicle)this.MemberwiseClone();

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

            foreach (PreviewPixel pixel in _pixels)
            {
                newLine.AddPixel(pixel.X, pixel.Y);
            }
            return(newLine);
        }
示例#3
0
        public override object Clone()
        {
            PreviewIcicle newIcicle = (PreviewIcicle)this.MemberwiseClone();

            newIcicle._points = new List <PreviewPoint>();

            foreach (var previewPoint in _points)
            {
                newIcicle._points.Add(previewPoint.Copy());
            }

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

            foreach (PreviewPixel pixel in _pixels)
            {
                newIcicle.Pixels.Add(pixel.Clone());
            }
            return(newIcicle);
        }