grid

fun Box.grid(columns: Int, rows: Int, slices: Int, marginX: Double = 0.0, marginY: Double = 0.0, marginZ: Double = 0.0, gutterX: Double = 0.0, gutterY: Double = 0.0, gutterZ: Double = 0.0): List<List<List<Box>>>(source)

Split Box into a grid of Boxes

Parameters

columns

the number of columns in the resulting grid

rows

the number of rows in the resulting grid

marginX

the unitless margin width

marginY

the unitless margin height

marginZ

the untless margin depth

gutterX

the unitless gutter width, the horizontal space between grid cells

gutterY

the unitless gutter height, the vertical space between grid cells

gutterZ

the unitless gutter depth


fun Box.grid(cellWidth: Double, cellHeight: Double, cellDepth: Double, minMarginX: Double = 0.0, minMarginY: Double = 0.0, minMarginZ: Double = 0.0, gutterX: Double = 0.0, gutterY: Double = 0.0, gutterZ: Double = 0.0): List<List<List<Box>>>(source)

Split Box into a grid of Boxes

Parameters

cellWidth

the unitless width of a cell

cellHeight

the unitless height of a cell

cellDepth

the unitless depth of a cell

minMarginX

the unitless minimum margin width (may increase to produce the desired cell aspect ratio)

minMarginY

the unitless minimum margin height (may increase to produce the desired cell aspect ratio)

minMarginZ

the unitless minimum margin depth (may increase to produce

gutterX

the unitless gutter width, the horizontal space between grid cells

gutterY

the unitless gutter height, the vertical space between grid cells

gutterZ

the unitless gutter depth


fun Rectangle.grid(columns: Int, rows: Int, marginX: Double = 0.0, marginY: Double = 0.0, gutterX: Double = 0.0, gutterY: Double = 0.0): RectangleGrid(source)

Splits Rectangle into a grid of Rectangles

Parameters

columns

the number of columns in the resulting grid

rows

the number of rows in the resulting grid

marginX

the unitless margin width

marginY

the unitless margin height

gutterX

the unitless gutter width, the horizontal space between grid cells

gutterY

the unitless gutter height, the vertical space between grid cells


fun Rectangle.grid(cellWidth: Double, cellHeight: Double, minMarginX: Double = 0.0, minMarginY: Double = 0.0, gutterX: Double = 0.0, gutterY: Double = 0.0): RectangleGrid(source)

Splits Rectangle into a grid of Rectangles

Parameters

cellWidth

the unitless width of a cell

cellHeight

the unitless height of a cell

minMarginX

the unitless minimum margin width (may increase to produce the desired cell aspect ratio)

minMarginY

the unitless minimum margin height (may increase to produce the desired cell aspect ratio)

gutterX

the unitless gutter width, the horizontal space between grid cells

gutterY

the unitless gutter height, the vertical space between grid cells