BoxConstraints
struct BoxConstraintsimport BoxConstraints from Wax;Minimum and maximum layout dimensions in logical points. Supply ordered bounds on both axes; construction does not validate them. Use Constrain to clamp a desired size into the box.
Members
minWidthfield
public float minWidthInclusive minimum width.
maxWidthfield
public float maxWidthInclusive maximum width.
minHeightfield
public float minHeightInclusive minimum height.
maxHeightfield
public float maxHeightInclusive maximum height.
constructorconstructor
public constructor (float minWidth, float maxWidth, float minHeight, float maxHeight)Stores all four bounds without validation.
Tightmethod
public static fn Tight(Size size) : BoxConstraintsRequires exactly the supplied size by setting equal minimum and maximum bounds.
Loosemethod
public static fn Loose(Size size) : BoxConstraintsAllows dimensions from zero up to the supplied size.
Biggestmethod
public fn Biggest() : SizeReturns the maximum width and height.
Smallestmethod
public fn Smallest() : SizeReturns the minimum width and height.
Constrainmethod
public fn Constrain(Size size) : SizeClamps width and height independently to their inclusive bounds. Supply ordered bounds; NaN dimensions remain NaN.
ToStringmethod
public fn ToString() : stringProvided by the compiler.
ToStringBuffermethod
public fn ToStringBuffer(StringBuilder builder) : int32Provided by the compiler.