#nullable enable
namespace Terminal.Gui;
///
/// Represents a position that is a percentage of the width or height of the SuperView.
///
///
///
/// This is a low-level API that is typically used internally by the layout system. Use the various static
/// methods on the class to create objects instead.
///
///
///
public class PosPercent (float percent) : Pos
{
///
/// Gets the factor that represents the percentage of the width or height of the SuperView.
///
public new float Percent { get; } = percent;
///
public override bool Equals (object? other) { return other is PosPercent f && f.Percent == Percent; }
///
public override int GetHashCode () { return Percent.GetHashCode (); }
///
public override string ToString () { return $"Percent({Percent})"; }
internal override int GetAnchor (int size) { return (int)(size * Percent); }
}