Documentation
¶
Overview ¶
Package internal handles common arguments.
Package internal handles floss colors.
Package internal has constants for parsing/producing patterns.
Package internal handles various utility functions.
Index ¶
- Constants
- func EncodeGeneratedHeader() []byte
- func EncodeOffset(width, height int) ([]byte, error)
- func EncodePalette(colors ...Palette) ([]byte, error)
- func FileOrStdin(fileName string) ([]byte, error)
- func FileOrStdout(fileName string, data []byte) error
- func NewArguments(set Mode, fxn func(*flag.FlagSet, Arguments) error) error
- func PrintUsage(exeName, version string)
- type Arguments
- type Color
- type ColorFactory
- type Mode
- type Palette
Constants ¶
const ( // TokenBlockStart represents a gxs block beginning. TokenBlockStart = " => {" // TokenDefaultBlock represents a default block value. TokenDefaultBlock = "" // TokenPaletteAssign represents assigning palette colors. TokenPaletteAssign = " => " // TokenNoColor represents a non-color area TokenNoColor = "NONE" // TokenBlockEnd represents the end of a gxs block. TokenBlockEnd = "}" // TokenComment represents a comment for gxs. TokenComment = "#" // BlockPalette represents a block containing palette information BlockPalette = "palette" // BlockPattern represents a block containing pattern layout/structure. BlockPattern = "pattern" // BlockAction represents an action with the gxs language. BlockAction = "action" // BlockMode represents setting the execution mode. BlockMode = "mode" // BlockOffset represents moving patterns by an offset BlockOffset = "offset" // IsXStitch represents cross stitch mode. IsXStitch = "xstitch" // ActionCommit represents a commit (save) action. ActionCommit = "commit" // OffsetDelimiter splits width/height in an offset OffsetDelimiter = "x" // NoneLegendToken is a token for a none indicator used internally NoneLegendToken = "-" )
Variables ¶
This section is empty.
Functions ¶
func EncodeGeneratedHeader ¶
func EncodeGeneratedHeader() []byte
EncodeGeneratedHeader encodes a common generated header for gxs patterns.
func EncodeOffset ¶
EncodeOffset encodes an offset value to gxs fragment.
func EncodePalette ¶
EncodePalette encodes a set of palette objects to gxs fragment block.
func FileOrStdin ¶
FileOrStdin will read from file (if given) else stdin.
func FileOrStdout ¶
FileOrStdout will write to a file (if given) else stdout.
func NewArguments ¶
NewArguments handles common arguments.
func PrintUsage ¶
func PrintUsage(exeName, version string)
PrintUsage will print overall usage for gxs.
Types ¶
type Arguments ¶
type Arguments struct { Out *string In *string Format *string GridWidth *int GridHeight *int GridSquare *int }
Arguments are common outputs from argument parsing
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
Color represents an internal floss color.
type ColorFactory ¶
type ColorFactory struct {
// contains filtered or unexported fields
}
ColorFactory handles getting/matching colors.
func NewColorLookup ¶
func NewColorLookup() ColorFactory
NewColorLookup creates a new factory for color matching.
func (ColorFactory) Count ¶
func (f ColorFactory) Count() int
Count gets the underlying available color count
Directories
¶
Path | Synopsis |
---|---|
Package bitstream for generating a simple bitstreamd pattern from text.
|
Package bitstream for generating a simple bitstreamd pattern from text. |
Package compile handles compiling inputs to stitchable images
|
Package compile handles compiling inputs to stitchable images |
Package handles floss upstream sources
|
Package handles floss upstream sources |
Package fonts handles font definitions within gxs.
|
Package fonts handles font definitions within gxs. |
generator
Package main generates fonts
|
Package main generates fonts |
Package grids handles making little grid patterns in gxs
|
Package grids handles making little grid patterns in gxs |
Package random handles cli for random output patterns
|
Package random handles cli for random output patterns |
Package transpile handles the transpiling process
|
Package transpile handles the transpiling process |