public CanHold ( |
||
subject | The rectangle to compare to | |
return | bool |
/// <summary> /// Resizes this rectangle to fit inside a target rectangle /// </summary> /// <param name="target">The target rectangle</param> /// <returns>A new rectangle that fits within the target rectangle</returns> public Rectangle EnsureFit(Rectangle target) => target.CanHold(this) ? new Rectangle(Width, Height) : Match(target);
/// <summary> /// Resizes this rectangle to fit inside a target rectangle /// </summary> /// <param name="target">The target rectangle</param> /// <returns>A new rectangle that fits within the target rectangle</returns> public Rectangle EnsureFit(Rectangle target) => target.CanHold(this) ? new Rectangle(Width, Height) : Match(target);