Versions in this module Expand all Collapse all v0 v0.1.0 Jun 8, 2022 Changes in this version + type HexGrid struct + Cols int + Context *gg.Context + Height int + Radius float64 + Rows int + Tiles [][]*Hexagon + Width int + func MakeHexGrid(w, h, r, c float64) *HexGrid + func MakeHexGridWithContext(ctx *gg.Context, r, c float64) *HexGrid + func (grid *HexGrid) DrawFunc(function func(x, y, h, w int, cell *Hexagon) error) error + func (grid *HexGrid) DrawGrid() + func (grid *HexGrid) GetNeighbors(x, y int) ([]*Hexagon, error) + func (grid *HexGrid) SavePNG(path string) error + func (grid *HexGrid) SetFill(x, y int, r, g, b, a float64) error + func (grid *HexGrid) SetFillAll(r, g, b, a float64) + func (grid *HexGrid) SetStroke(x, y int, r, g, b, a, w float64) error + func (grid *HexGrid) SetStrokeAll(r, g, b, a, w float64) + func (grid *HexGrid) SetText(x, y int, r, g, b, a float64, txt string, fontSize float64) error + type Hexagon struct + FA float64 + FB float64 + FG float64 + FR float64 + Font font.Face + SA float64 + SB float64 + SG float64 + SR float64 + SW float64 + TA float64 + TB float64 + TG float64 + TR float64 + Text string + X int + Y int + func (h *Hexagon) SetFill(r, g, b, a float64) + func (h *Hexagon) SetStroke(r, g, b, a, w float64) + func (h *Hexagon) SetText(r, g, b, a float64, text string, font font.Face)