HexGrid
fun HexGrid(grid: ImmutableGrid, modifier: Modifier = Modifier, fitMode: FitMode = FitMode.FitColumns, crossMode: CrossMode = CrossMode.AlignCenter, hexOrientation: HexOrientation = HexOrientation.Horizontal, strokeWidth: Dp = Dp.Hairline, colors: HexGridColors = HexGridDefaults.colors(), indicesShown: IndicesShown = HexGridDefaults.indicesShown(), clipToBounds: Boolean = true, onGridTap: (Grid.Address) -> Unit? = null, onOutsideTap: () -> Unit? = null, cellItems: @Composable HexGridItemScope.(Grid.Address) -> Unit? = null)
The Compose version of the library's hex grid.
Parameters
grid
The HexGrid's data set
modifier
The Modifier to be applied to the grid
hexOrientation
Orientation of a cell hexagon's major axis
fitMode
Whether rows or columns determine the cells' size
crossMode
Behavior for the other direction, rows or columns
strokeWidth
Stroke width of the cell outline
colors
The grid's three colors: line, fill, and select
indicesShown
Design/debug flags to display cells' row and/or column
clipToBounds
Whether to clip the grid draw to the Composable's bounds
onGridTap
Called with the Grid.Address when a tap hits successfully
onOutsideTap
Called when the Composable is clicked outside of any cell
cellItems
Each cell is allowed one (centered) Composable for content