コード例 #1
0
ファイル: LinearScale.cs プロジェクト: olesar/Altaxo
            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);
            }
コード例 #2
0
ファイル: LinkedScale.cs プロジェクト: olesar/Altaxo
 public LinkedScale()
 {
     Scale     = new LinearScale();
     _linkOrgA = 0;
     _linkOrgB = 1;
     _linkEndA = 0;
     _linkEndB = 1;
 }
コード例 #3
0
ファイル: LinearScale.cs プロジェクト: olesar/Altaxo
        /// <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;
        }
コード例 #4
0
ファイル: LinearScale.cs プロジェクト: olesar/Altaxo
        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());
        }
コード例 #5
0
ファイル: LinkedScale.cs プロジェクト: Altaxo/Altaxo
		public LinkedScale()
		{
			Scale = new LinearScale();
			_linkOrgA = 0;
			_linkOrgB = 1;
			_linkEndA = 0;
			_linkEndB = 1;
		}
コード例 #6
0
ファイル: LinearScale.cs プロジェクト: Altaxo/Altaxo
		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());
		}
コード例 #7
0
ファイル: LinearScale.cs プロジェクト: Altaxo/Altaxo
		/// <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;
		}