Package com.tonic.vellum.layout
Class LayoutSolver
- java.lang.Object
-
- com.tonic.vellum.layout.LayoutSolver
-
public final class LayoutSolver extends java.lang.ObjectA constraint solver that divides a rect among children along one axis, always tiling the extent exactly: any rounding remainder goes to the last flexible item, or stretches the last item if none is flexible.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Rect[]solve(Rect available, java.util.List<Constraint> constraints, Axis axis)Divides the available rect among the constraints along the given axis.
-
-
-
Method Detail
-
solve
public static Rect[] solve(Rect available, java.util.List<Constraint> constraints, Axis axis)
Divides the available rect among the constraints along the given axis.- Parameters:
available- the rect to subdivideconstraints- the per-child sizing rules, in orderaxis- the axis to divide along- Returns:
- one rect per constraint that together tile the available rect
-
-