Documentation ¶
Index ¶
- func Background(hex string) func(*Grid)
- func Margin(val int) func(*Grid)
- func Watermark(text string) func(*Grid)
- type Grid
- func (g *Grid) CellCenter(row, col int) gg.Point
- func (g *Grid) CellSize() float64
- func (g *Grid) Context() *gg.Context
- func (g *Grid) DrawBorder()
- func (g *Grid) DrawCoords()
- func (g *Grid) DrawGrid()
- func (g *Grid) DrawImage(img image.Image, row, col int) error
- func (g *Grid) DrawWatermark()
- func (g *Grid) EncodePNG(w io.Writer) error
- func (g *Grid) SavePNG(filename string) error
- func (g *Grid) VerifyInBounds(row, col int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
Grid represents the grid structure
func (*Grid) CellCenter ¶
CellCenter retuns the cell coordinates in the grid
func (*Grid) DrawImage ¶
DrawImage draws the image at row and col. If the image size is greater then the gtid cell size it will be shrinked.
func (*Grid) VerifyInBounds ¶
VerifyInBounds verify that the coordinates belongs to the grid
Click to show internal directories.
Click to hide internal directories.