Пример #1
0
            /// <summary>
            /// Copies data from another edge status object.
            /// </summary>
            /// <param name="other">The object to copy.</param>
            internal void CopyFrom(EdgeStatus other)
            {
                if (other == null)
                {
                    throw new ArgumentNullException(nameof(other));
                }
                switch (Constraint = other.Constraint)
                {
                case RelativeConstraintType.ToComponent:
                    FromComponent = other.FromComponent;
                    break;

                case RelativeConstraintType.ToAnchor:
                    FromAnchor = other.FromAnchor;
                    break;

                case RelativeConstraintType.Locked:
                    FromAnchor = other.FromAnchor;
                    Offset     = other.Offset;
                    break;

                case RelativeConstraintType.Unconstrained:
                default:
                    break;
                }
            }
Пример #2
0
 /// <summary>
 /// Resets these offsets to unlocked.
 /// </summary>
 public void Reset()
 {
     Constraint    = RelativeConstraintType.Unconstrained;
     Offset        = 0.0f;
     FromAnchor    = 0.0f;
     FromComponent = default;
 }
Пример #3
0
 internal EdgeStatus()
 {
     FromAnchor    = 0.0f;
     FromComponent = default;
     Offset        = 0.0f;
     Constraint    = RelativeConstraintType.Unconstrained;
 }