Constraints
The extents a parent offers a child: the least it must occupy along each axis and the most it may.
A container computes these for each of its children and measures the child under them; the child answers with an extent inside them. Int.MAX_VALUE as a maximum means the axis is unbounded - the parent imposes no ceiling there, which is what a container asked for the extent it prefers offers, and what maximumLayoutSize already reports for a row.
The extents are plain Ints, the unit every other geometry in this library is written in.
Throws
if either minimum is negative or greater than its own maximum
Properties
Whether the height has a finite maximum.
Whether the width has a finite maximum.
Whether the height can take exactly one value.
Whether the width can take exactly one value.
the most height the child may occupy, Int.MAX_VALUE for an unbounded axis
the most width the child may occupy, Int.MAX_VALUE for an unbounded axis
Functions
Takes a size and returns the closest size to it that satisfies the constraints.
Takes otherConstraints and returns the result of coercing them in the current constraints. Note this means that any size satisfying the resulting constraints will satisfy the current constraints, but they might not satisfy the otherConstraints when the two set of constraints are disjoint. Examples (showing only width, height works the same): (minWidth=2, maxWidth=10).constrain(minWidth=7, maxWidth=12) -> (minWidth = 7, maxWidth = 10) (minWidth=2, maxWidth=10).constrain(minWidth=11, maxWidth=12) -> (minWidth=10, maxWidth=10) (minWidth=2, maxWidth=10).constrain(minWidth=5, maxWidth=7) -> (minWidth=5, maxWidth=7)
Takes a height and returns the closest size to it that satisfies the constraints.
Takes a width and returns the closest size to it that satisfies the constraints.
A copy with both minimum dimensions reset to zero.
Takes a size and returns whether it satisfies the current constraints.
Returns the Constraints obtained by offsetting the current instance with the given values.