public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext) { base.CopyFrom(from, cloneContext); DxfBlockPolarStretchAction polarStretchAction = (DxfBlockPolarStretchAction)from; this.ActionConnections = DxfConnectionPoint.Clone(cloneContext, polarStretchAction.ActionConnections); if (polarStretchAction.Frame == null) { this.Frame = (WW.Math.Point2D[])null; } else { this.Frame = new WW.Math.Point2D[polarStretchAction.Frame.Length]; for (int index = 0; index < polarStretchAction.Frame.Length; ++index) { this.Frame[index] = polarStretchAction.Frame[index]; } } if (polarStretchAction.RotateSelection == null) { this.RotateSelection = (DxfHandledObjectCollection <DxfHandledObject>)null; } else { int count = polarStretchAction.RotateSelection.Count; this.RotateSelection = new DxfHandledObjectCollection <DxfHandledObject>(count); for (int index = 0; index < count; ++index) { this.RotateSelection.Add(cloneContext.SourceModel == cloneContext.TargetModel ? polarStretchAction.RotateSelection[index] : polarStretchAction.RotateSelection[index].Clone(cloneContext) as DxfHandledObject); } } this.StretchEntities = DxfBlockPolarStretchAction.StretchEntity.Clone(polarStretchAction.StretchEntities, cloneContext); this.StretchNodes = DxfBlockPolarStretchAction.StretchNode.Clone(cloneContext, polarStretchAction.StretchNodes); }
public override IGraphCloneable Clone(CloneContext cloneContext) { DxfBlockPolarStretchAction polarStretchAction = (DxfBlockPolarStretchAction)cloneContext.GetExistingClone((IGraphCloneable)this); if (polarStretchAction == null) { polarStretchAction = new DxfBlockPolarStretchAction(); cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)polarStretchAction); polarStretchAction.CopyFrom((DxfHandledObject)this, cloneContext); } return((IGraphCloneable)polarStretchAction); }