Documentation
¶
Overview ¶
Package plot provides library code to for rendering hex coordinates grids
Index ¶
- type Cell
- type CellStyle
- type CellStyleFunc
- type Figure
- func (f *Figure) AddCoord(coord coord.Coord)
- func (f *Figure) AddCoords(coords coord.Coords)
- func (f *Figure) AddStyledCoord(coord coord.Coord, style Style)
- func (f *Figure) AddStyledCoords(coords coord.Coords, style Style)
- func (f *Figure) Render(writer io.Writer) error
- func (f *Figure) RenderFile(name string) error
- func (f *Figure) SetCoordType(coordType consts.CoordType)
- func (f *Figure) SetOrientation(orientation consts.Orientation)
- func (f *Figure) SetTheme(theme *Theme)
- type Style
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CellStyleFunc ¶
CellStyleFunc is a function for styling a cell in the figure
type Figure ¶
type Figure struct {
// contains filtered or unexported fields
}
Figure represents a collection of hex coordinates to be plotted
func (*Figure) AddStyledCoord ¶
AddStyledCoord adds a styled hex cell at the given coordinate, using the given style
func (*Figure) AddStyledCoords ¶
AddStyledCoords adds a styled hex cells at the given coordinates, using the given style
func (*Figure) RenderFile ¶
RenderFile renders the figure to the specified SVG file
func (*Figure) SetCoordType ¶
SetCoordType sets the coordinate system type to use for rendering coordinate values
func (*Figure) SetOrientation ¶ added in v0.1.1
func (f *Figure) SetOrientation(orientation consts.Orientation)
SetOrientation sets the orientation of the hexagons rendered by the figure
type Style ¶
Style represents text and cell style
type Theme ¶
type Theme struct {
BackgroundColor color.RGBA
BorderColor color.RGBA
CellColor color.RGBA
CoordQColor color.RGBA
CoordRColor color.RGBA
CoordSColor color.RGBA
TextColor color.RGBA
}
Theme represents a theme for coloring a figure and its cells
func DefaultTheme ¶
func DefaultTheme() *Theme
DefaultTheme returns the default theme for styling figures