/// <summary> /// Creates a new Underlay that is a copy of the current instance. /// </summary> /// <returns>A new Underlay that is a copy of this instance.</returns> public override object Clone() { Underlay entity = new Underlay { //EntityObject properties Layer = (Layer)Layer.Clone(), Linetype = (Linetype)Linetype.Clone(), Color = (AciColor)Color.Clone(), Lineweight = Lineweight, Transparency = (Transparency)Transparency.Clone(), LinetypeScale = LinetypeScale, Normal = Normal, IsVisible = IsVisible, //Underlay properties Definition = (UnderlayDefinition)definition.Clone(), Position = position, Scale = scale, Rotation = rotation, Contrast = contrast, Fade = fade, DisplayOptions = displayOptions, ClippingBoundary = clippingBoundary != null ? (ClippingBoundary)clippingBoundary.Clone() : null }; foreach (XData data in XData.Values) { entity.XData.Add((XData)data.Clone()); } return(entity); }
/// <summary> /// Creates a new Image that is a copy of the current instance. /// </summary> /// <returns>A new Image that is a copy of this instance.</returns> public override object Clone() { Image entity = new Image { //EntityObject properties Layer = (Layer)Layer.Clone(), Linetype = (Linetype)Linetype.Clone(), Color = (AciColor)Color.Clone(), Lineweight = Lineweight, Transparency = (Transparency)Transparency.Clone(), LinetypeScale = LinetypeScale, Normal = Normal, IsVisible = IsVisible, //Image properties Position = position, Height = height, Width = width, Uvector = uvector, Vvector = vvector, //Rotation = this.rotation, Definition = (ImageDefinition)imageDefinition.Clone(), Clipping = clipping, Brightness = brightness, Contrast = contrast, Fade = fade, DisplayOptions = displayOptions, ClippingBoundary = (ClippingBoundary)clippingBoundary.Clone() }; foreach (XData data in XData.Values) { entity.XData.Add((XData)data.Clone()); } return(entity); }
/// <summary> /// Creates a new Wipeout that is a copy of the current instance. /// </summary> /// <returns>A new Wipeout that is a copy of this instance.</returns> public override object Clone() { Wipeout entity = new Wipeout((ClippingBoundary)ClippingBoundary.Clone()) { //EntityObject properties Layer = (Layer)Layer.Clone(), Linetype = (Linetype)Linetype.Clone(), Color = (AciColor)Color.Clone(), Lineweight = Lineweight, Transparency = (Transparency)Transparency.Clone(), LinetypeScale = LinetypeScale, Normal = Normal, IsVisible = IsVisible, //Wipeout properties Elevation = elevation }; foreach (XData data in XData.Values) { entity.XData.Add((XData)data.Clone()); } return(entity); }