/// <summary> /// Copies from another model with a deep copy. /// </summary> /// <param name="m">The model to copy from.</param> public void CopyFrom(PlotModel m) { X0 = m.X0; X1 = m.X1; Y0 = m.Y0; Y1 = m.Y1; Z0 = m.Z0; Z1 = m.Z1; x.CopyFrom(m.x); y.CopyFrom(m.y); z.CopyFrom(m.z); Border = m.Border; FixXtoY = m.FixXtoY; Legend = m.Legend; LegendBorder = m.LegendBorder; Twoside = m.Twoside; ScaleFont = (Font)m.ScaleFont.Clone(); LegendFont = (Font)m.LegendFont.Clone(); UnitsFont = (Font)m.UnitsFont.Clone(); ScaleColor = m.ScaleColor; ScaleLineWidth = m.ScaleLineWidth; View = m.View; if (m.Filename != null) { Filename = (string)m.Filename.Clone(); } else { Filename = null; } base.CopyFrom(m); Modified = true; }
/// <summary> /// Creates a deep copy. /// </summary> public Scale Clone(PlotModel model) { Scale copy = new Scale(model); copy.CopyFrom(this); return(copy); }