Documentation
¶
Index ¶
- Constants
- func CenteredOrigin(area Rect, cols, rows int, cellSize float64) (float64, float64)
- func ClampStandardCellFontSize(fontSize float64) float64
- func FitCompactCellSize(cols, rows int, area Rect) float64
- func FitHashiCellSize(cols, rows int, area Rect) float64
- func FitNonogramCellSize(cols, rows int, area Rect) float64
- func FitSudokuCellSize(cols, rows int, area Rect) float64
- func FitTableCellSize(cols, rows int, area Rect) float64
- func FitWordSearchCellSize(cols, rows int, area Rect) float64
- func InstructionY(boardBottom, pageH float64, lineCount int) float64
- func SetInstructionStyle(pdf *fpdf.Fpdf)
- func StandardCellFontSize(cellSize, scale float64) float64
- func WritePDF(outputPath string, docs []PackDocument, puzzles []Puzzle, cfg RenderConfig) error
- type DifficultyConfidence
- type FillominoData
- type GridTable
- type HashiData
- type HashiIsland
- type HitoriData
- type JSONLPackMeta
- type JSONLPuzzle
- type JSONLRecord
- type NonogramData
- type NurikabeData
- type PackDocument
- type PackMetadata
- type Puzzle
- type RGB
- type Rect
- type RenderConfig
- type RippleEffectCage
- type RippleEffectCell
- type RippleEffectData
- type ShikakuData
- type SudokuData
- type TakuzuData
- type WordSearchData
Constants ¶
View Source
const ( SansFontFamily = sansFontFamily PrimaryTextGray = primaryTextGray SecondaryTextGray = secondaryTextGray RuleTextGray = ruleTextGray DimTextGray = dimTextGray ThinGridLineMM = thinGridLineMM MajorGridLineMM = majorGridLineMM OuterBorderLineMM = outerBorderLineMM InstructionLineHMM = instructionLineHMM PuzzleBottomInsetMM = puzzleBottomInsetMM WordSearchGridGapMM = wordSearchGridListGap PuzzleWordBankFontSize = puzzleWordBankFontSize PuzzleWordBankHeadSize = puzzleWordBankHeadSize )
View Source
const ExportSchemaV1 = "puzzletea.export.v1"
Variables ¶
This section is empty.
Functions ¶
func CenteredOrigin ¶
func FitCompactCellSize ¶
func FitHashiCellSize ¶
func FitNonogramCellSize ¶
func FitSudokuCellSize ¶
func FitTableCellSize ¶
func FitWordSearchCellSize ¶
func InstructionY ¶
func SetInstructionStyle ¶
func StandardCellFontSize ¶
func WritePDF ¶
func WritePDF(outputPath string, docs []PackDocument, puzzles []Puzzle, cfg RenderConfig) error
Types ¶
type DifficultyConfidence ¶
type DifficultyConfidence string
const ( DifficultyConfidenceHigh DifficultyConfidence = "high" DifficultyConfidenceMedium DifficultyConfidence = "medium" )
type FillominoData ¶
func ParseFillominoPrintData ¶
func ParseFillominoPrintData(saveData []byte) (*FillominoData, error)
type HashiData ¶
type HashiData struct {
Width int
Height int
Islands []HashiIsland
}
func ParseHashiPrintData ¶
type HashiIsland ¶
type HitoriData ¶
func ParseHitoriPrintData ¶
func ParseHitoriPrintData(saveData []byte) (*HitoriData, error)
type JSONLPackMeta ¶
type JSONLPuzzle ¶
type JSONLRecord ¶
type JSONLRecord struct {
Schema string `json:"schema"`
Pack JSONLPackMeta `json:"pack"`
Puzzle JSONLPuzzle `json:"puzzle"`
}
type NonogramData ¶
func ParseNonogramPrintData ¶
func ParseNonogramPrintData(saveData []byte) (*NonogramData, error)
type NurikabeData ¶
func ParseNurikabePrintData ¶
func ParseNurikabePrintData(saveData []byte) (*NurikabeData, error)
type PackDocument ¶
type PackDocument struct {
SourcePath string
Metadata PackMetadata
Puzzles []Puzzle
}
func ParseFile ¶
func ParseFile(path string) (PackDocument, error)
func ParseFiles ¶
func ParseFiles(paths []string) ([]PackDocument, error)
func ParseJSONLFile ¶
func ParseJSONLFile(path string) (PackDocument, error)
func ParseJSONLFiles ¶
func ParseJSONLFiles(paths []string) ([]PackDocument, error)
func ParseMarkdown ¶
func ParseMarkdown(path, content string) (PackDocument, error)
type PackMetadata ¶
type Puzzle ¶
type Puzzle struct {
SourcePath string
SourceFileName string
Category string
ModeSelection string
Name string
Index int
Body string
SaveData []byte
PrintPayload any
DifficultyScore float64
DifficultyConfidence DifficultyConfidence
DifficultySource string
}
func OrderPuzzlesForPrint ¶
type RenderConfig ¶
type RippleEffectCage ¶
type RippleEffectCage struct {
Size int `json:"size"`
Cells []RippleEffectCell `json:"cells"`
}
type RippleEffectCell ¶
type RippleEffectData ¶
type RippleEffectData struct {
Width int
Height int
Givens [][]int
Cages []RippleEffectCage
}
func ParseRippleEffectPrintData ¶
func ParseRippleEffectPrintData(saveData []byte) (*RippleEffectData, error)
type ShikakuData ¶
func ParseShikakuPrintData ¶
func ParseShikakuPrintData(saveData []byte) (*ShikakuData, error)
type SudokuData ¶
type SudokuData struct {
Givens [9][9]int `json:"givens"`
}
func ParseSudokuPrintData ¶
func ParseSudokuPrintData(saveData []byte) (*SudokuData, error)
type TakuzuData ¶
func ParseTakuzuPrintData ¶
func ParseTakuzuPrintData(saveData []byte) (*TakuzuData, error)
type WordSearchData ¶
type WordSearchData struct {
Width int `json:"width"`
Height int `json:"height"`
Grid [][]string `json:"grid"`
Words []string `json:"words"`
}
func ParseWordSearchPrintData ¶
func ParseWordSearchPrintData(saveData []byte) (*WordSearchData, error)
Click to show internal directories.
Click to hide internal directories.