Documentation ¶
Index ¶
Constants ¶
const ( XMLNS = "http://www.w3.org/2000/svg" XMLNS_XLINK = "http://www.w3.org/1999/xlink" BOXSIZE = 32 LETTER_X_OFFSET = 8 LETTER_Y_OFFSET = 28 LETTER_FONT_FAMILY = "monospace" LETTER_FONT_SIZE = "18pt" NUMBER_X_OFFSET = 2 NUMBER_Y_OFFSET = 10 NUMBER_FONT_SIZE = "8pt" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SVG ¶
type SVG struct {
// contains filtered or unexported fields
}
func NewSVG ¶
NewSVG will create a new SVG object from an abstract matrix of bytes. This for convenience of unit testing, since it does not need any reference to the model.
func NewSVGFromPuzzle ¶ added in v0.7.4
NewSVGFromPuzzle will create a new SVG object from a grid, delegating that to NewSVG after creating the simple cell matrix it needs.
func (*SVG) BoundingRectangle ¶
BoundingRectangle creates an element that draws a box around the whole grid.
func (*SVG) Cells ¶
Cells generates the cells of the grid, including black cells and any letter values.
func (*SVG) GenerateSVG ¶
GenerateSVG creates a SVG image of the grid.
func (*SVG) HorizontalLines ¶
HorizontalLines generates the horizontal lines of the grid
func (*SVG) VerticalLines ¶
VerticalLines generates the vertical lines of the grid.
func (*SVG) WordNumbers ¶
WordNumbers generates the word numbers of the grid.