/// <summary> /// Construct a new <see cref="ScaleStateList" /> automatically from an /// existing <see cref="Y2AxisList" />. /// </summary> /// <param name="list">The <see cref="Y2AxisList" /> (a list of Y axes), /// from which to retrieve the state and create the <see cref="ScaleState" /> /// objects.</param> public ScaleStateList(Y2AxisList list) { foreach (Axis axis in list) { this.Add(new ScaleState(axis)); } }
/// <summary> /// /// </summary> /// <param name="list"></param> public void ApplyScale(Y2AxisList list) { int count = Math.Min(list.Count, this.Count); for (int i = 0; i < count; i++) { this[i].ApplyScale(list[i]); } }
/// <summary> /// Iterate through the list of <see cref="ScaleState" /> objects, comparing them /// to the state of the specified <see cref="Y2AxisList" /> <see cref="Axis" /> /// objects. /// </summary> /// <param name="list">A <see cref="Y2AxisList" /> object specifying a list of /// <see cref="Axis" /> objects to be compared with this <see cref="ScaleStateList" />. /// </param> /// <returns>true if a difference is found, false otherwise</returns> public bool IsChanged(Y2AxisList list) { int count = Math.Min(list.Count, this.Count); for (int i = 0; i < count; i++) { if (this[i].IsChanged(list[i])) { return(true); } } return(false); }