public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { LinearScale s = null != o ? (LinearScale)o : new LinearScale(); s._baseOrg = info.GetDouble("BaseOrg"); s._baseEnd = info.GetDouble("BaseEnd"); s._majorSpan = info.GetDouble("MajorSpan"); s._minorTicks = info.GetInt32("MinorTicks"); s._axisOrgByMajor = info.GetDouble("OrgByMajor"); s._axisEndByMajor = info.GetDouble("EndByMajor"); bool AxisOrgFixed = info.GetBoolean("OrgFixed"); bool AxisEndFixed = info.GetBoolean("EndFixed"); s._dataBounds = (FiniteNumericalBoundaries)info.GetValue("Bounds", s); s.SetCachedValues(); // restore the event chain s._dataBounds.ParentObject = s; s._rescaling = new LinearScaleRescaleConditions(); s._rescaling.SetUserParameters(AxisOrgFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.Org, AxisEndFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.End); s._rescaling.ParentObject = s; return(s); }
public LinkedScale() { Scale = new LinearScale(); _linkOrgA = 0; _linkOrgB = 1; _linkEndA = 0; _linkEndB = 1; }
/// <summary> /// Copy constructor. /// </summary> /// <param name="from">A other linear axis from which to copy from.</param> public LinearScale(LinearScale from) { IsLinked = from.IsLinked; _cachedAxisEnd = from._cachedAxisEnd; _axisEndByMajor = from._axisEndByMajor; _cachedAxisOrg = from._cachedAxisOrg; _axisOrgByMajor = from._axisOrgByMajor; _cachedAxisSpan = from._cachedAxisSpan; _baseEnd = from._baseEnd; _baseOrg = from._baseOrg; _dataBounds = null == from._dataBounds ? new FiniteNumericalBoundaries() : (NumericalBoundaries)from._dataBounds.Clone(); _dataBounds.ParentObject = this; _majorSpan = from._majorSpan; _minorTicks = from._minorTicks; _cachedOneByAxisSpan = from._cachedOneByAxisSpan; _rescaling = null == from.Rescaling ? new LinearScaleRescaleConditions() : (LinearScaleRescaleConditions)from.Rescaling.Clone(); _rescaling.ParentObject = this; }
public virtual void CopyFrom(LinearScale from) { if (object.ReferenceEquals(this, from)) { return; } _cachedAxisEnd = from._cachedAxisEnd; _axisEndByMajor = from._axisEndByMajor; _cachedAxisOrg = from._cachedAxisOrg; _axisOrgByMajor = from._axisOrgByMajor; _cachedAxisSpan = from._cachedAxisSpan; _baseEnd = from._baseEnd; _baseOrg = from._baseOrg; ChildCopyToMemberOrCreateNew(ref _dataBounds, from._dataBounds, () => new FiniteNumericalBoundaries()); _majorSpan = from._majorSpan; _minorTicks = from._minorTicks; _cachedOneByAxisSpan = from._cachedOneByAxisSpan; ChildCopyToMemberOrCreateNew(ref _rescaling, from._rescaling, () => new LinearScaleRescaleConditions()); }
public virtual void CopyFrom(LinearScale from) { if (object.ReferenceEquals(this, from)) return; this._cachedAxisEnd = from._cachedAxisEnd; this._axisEndByMajor = from._axisEndByMajor; this._cachedAxisOrg = from._cachedAxisOrg; this._axisOrgByMajor = from._axisOrgByMajor; this._cachedAxisSpan = from._cachedAxisSpan; this._baseEnd = from._baseEnd; this._baseOrg = from._baseOrg; ChildCopyToMemberOrCreateNew(ref _dataBounds, from._dataBounds, () => new FiniteNumericalBoundaries()); this._majorSpan = from._majorSpan; this._minorTicks = from._minorTicks; this._cachedOneByAxisSpan = from._cachedOneByAxisSpan; ChildCopyToMemberOrCreateNew(ref _rescaling, from._rescaling, () => new LinearScaleRescaleConditions()); }
/// <summary> /// Copy constructor. /// </summary> /// <param name="from">A other linear axis from which to copy from.</param> public LinearScale(LinearScale from) { this.IsLinked = from.IsLinked; this._cachedAxisEnd = from._cachedAxisEnd; this._axisEndByMajor = from._axisEndByMajor; this._cachedAxisOrg = from._cachedAxisOrg; this._axisOrgByMajor = from._axisOrgByMajor; this._cachedAxisSpan = from._cachedAxisSpan; this._baseEnd = from._baseEnd; this._baseOrg = from._baseOrg; this._dataBounds = null == from._dataBounds ? new FiniteNumericalBoundaries() : (NumericalBoundaries)from._dataBounds.Clone(); _dataBounds.ParentObject = this; this._majorSpan = from._majorSpan; this._minorTicks = from._minorTicks; this._cachedOneByAxisSpan = from._cachedOneByAxisSpan; this._rescaling = null == from.Rescaling ? new LinearScaleRescaleConditions() : (LinearScaleRescaleConditions)from.Rescaling.Clone(); this._rescaling.ParentObject = this; }