예제 #1
0
        public IDrawObject Clone()
        {
            MultiLine multiLine = new MultiLine();

            multiLine.Copy(this);
            return(multiLine);
        }
예제 #2
0
 public virtual void Copy(MultiLine multiLine)
 {
     base.Copy(multiLine);
     this.MultiLinePoints = new List <UnitPoint>(multiLine.MultiLinePoints);
     this.IsSelected      = multiLine.IsSelected;
     this.drawStatus      = multiLine.drawStatus;
     this.SN = multiLine.SN;
 }
예제 #3
0
        public void Finish()
        {
            int       points = this.owner.MultiLinePoints.Count;
            UnitPoint offset = new UnitPoint(this.clone.MultiLinePoints[0].X - this.owner.MultiLinePoints[0].X, this.clone.MultiLinePoints[0].Y - this.owner.MultiLinePoints[0].Y);

            for (int i = 0; i < this.owner.MultiLinePoints.Count; i++)
            {
                this.endPoints[i] = this.clone.MultiLinePoints[i];
            }
            this.owner.Copy(this.clone);
            this.owner.IsSelected     = true;
            this.owner.StartMovePoint = new UnitPoint(this.owner.StartMovePoint.X + offset.X, this.owner.StartMovePoint.Y + offset.Y);
            this.clone = null;
        }
예제 #4
0
 public NodeMultiLine(MultiLine owner, int nodeIndex)
 {
     this.owner            = owner;
     this.clone            = this.owner.Clone() as MultiLine;
     this.clone.IsSelected = true;
     this.originalPoints   = new UnitPoint[owner.MultiLinePoints.Count];
     this.endPoints        = new UnitPoint[owner.MultiLinePoints.Count];
     for (int i = 0; i < owner.MultiLinePoints.Count; i++)
     {
         this.originalPoints[i] = owner.MultiLinePoints[i];
         this.endPoints[i]      = owner.MultiLinePoints[i];
     }
     this.clone.currentNodeIndex = nodeIndex;
     this.nodeIndex = nodeIndex;
 }
예제 #5
0
 private void SetPoint(MultiLine multiLine, UnitPoint unitPoint)
 {
     multiLine.MultiLinePoints[nodeIndex] = unitPoint;
 }