Beispiel #1
0
        public AbstractArrow(IFigure figure)
        {
            AbstractArrow arrow = (AbstractArrow)figure;

            Points = new List <Point>();
            _pen   = new Pen(arrow._pen.Color, arrow._pen.Width);
            for (int i = 0; i < arrow.Points.Count; i++)
            {
                Point point = new Point(arrow.Points[i].X, arrow.Points[i].Y);
                Points.Add(point);
            }
            DataCommon         = new List <DataCommon>();
            StartDirectionAxis = arrow.StartDirectionAxis;
            EndDirectionAxis   = arrow.EndDirectionAxis;
            SelectedZone       = new ZoneOfArrow();
            SetEndCap();
        }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            if (obj is AbstractBox)
            {
                return(false);
            }
            AbstractArrow arrow = (AbstractArrow)obj;

            for (int i = 0; i < Points.Count; i++)
            {
                if (this.Points[i].X != arrow.Points[i].X ||
                    this.Points[i].Y != arrow.Points[i].Y)
                {
                    return(false);
                }
            }
            return(true);
        }