Import std.term.region
Constraint
struct
Public Struct Constraint Implements Hashable, Printable
How big one part of a split is: a Fixed number of cells, a Percent of the cells there are, at least a Min of them and a share of what's left like a Fill of 1, or a Fill, a share of what's left by its weight beside the other Fills'.
Examples
Expect("{Constraint.Fixed(3)}" == "Fixed(3)")
Local parts = Region(0, 0, 10, 1).SplitColumns(Constraint.Min(2), Constraint.Fill(3))
Expect(parts[0].Width + parts[1].Width == 10)-
What kind of constraint it is.
-
Its cells, percent, or weight, as its Kind has it.
-
sizecells. Panics for a negativesize. -
percentof the cells there are, rounded down. Panics for a percent below 0 or past 100. -
At least
sizecells, and a share of what's left, as a Fill of 1. Panics for a negativesize. -
A share of what's left, by
weightbeside the other Fills' weights: a Fill of 2 gets twice a Fill of 1's. Panics for a negativeweight. -
Like "Fixed(3)" or "Fill(1)".
Report an issue with this page or with FutureBlitz on GitHub.