output

package
v0.0.0-...-72a79d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2019 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TermBlack = iota + 40
	TermRed
	TermGreen
	TermYellow
	TermBlue
	TermMagenta
	TermCyan
	TermWhite
)
View Source
const (
	TermBlackBright = iota + 100
	TermRedBright
	TermGreenBright
	TermYellowBright
	TermBlueBright
	TermMagentaBright
	TermCyanBright
	TermWhiteBright
)

Variables

View Source
var (
	DefaultCircleProcessor = func(s *svg.SVG, x, y, block int, v uint8) {
		if v == qrencode.ElWhite {
			s.Circle(x+block/2, y+block/2, block/2, "fill:white;stroke:none")
		} else {
			s.Circle(x+block/2, y+block/2, block/2, "fill:black;stroke:none")
		}
	}

	DefaultRectangleProcessor = func(s *svg.SVG, x, y, block int, v uint8) {
		if v == qrencode.ElWhite {
			s.Rect(x, y, block, block, "fill:white;stroke:none")
		} else {
			s.Rect(x, y, block, block, "fill:black;stroke:none")
		}
	}
)

Functions

This section is empty.

Types

type GifOutput

type GifOutput struct {
	// contains filtered or unexported fields
}

func NewGifOutput

func NewGifOutput(block, margin int, black, white color.Gray16, options *gif.Options) *GifOutput

func (*GifOutput) Image

func (o *GifOutput) Image(grid *qrencode.Grid) image.Image

func (*GifOutput) Output

func (o *GifOutput) Output(grid *qrencode.Grid, w io.Writer)

type Interface

type Interface interface {
	Output(*qrencode.Grid, io.Writer)
}

type JpegOutput

type JpegOutput struct {
	// contains filtered or unexported fields
}

func NewJpegOutput

func NewJpegOutput(block, margin int, black, white color.Gray16, options *jpeg.Options) *JpegOutput

func (*JpegOutput) Image

func (o *JpegOutput) Image(grid *qrencode.Grid) image.Image

func (*JpegOutput) Output

func (o *JpegOutput) Output(grid *qrencode.Grid, w io.Writer)

type PngOutput

type PngOutput struct {
	// contains filtered or unexported fields
}

func NewPngOutput

func NewPngOutput(block, margin int, black, white color.Gray16) *PngOutput

func (*PngOutput) Image

func (o *PngOutput) Image(grid *qrencode.Grid) image.Image

func (*PngOutput) Output

func (o *PngOutput) Output(grid *qrencode.Grid, w io.Writer)

type TerminalOutput

type TerminalOutput struct {
	// contains filtered or unexported fields
}

func NewTerminalOutput

func NewTerminalOutput(black, white *TerminalSymbol) *TerminalOutput

func (*TerminalOutput) Output

func (o *TerminalOutput) Output(grid *qrencode.Grid, w io.Writer)

type TerminalSymbol

type TerminalSymbol struct {
	Background int
	Symbol     string
}

type VectorImage

type VectorImage struct {
	Filename string
	Size     int
}

type VectorOutput

type VectorOutput struct {
	// contains filtered or unexported fields
}

func NewVectorOutput

func NewVectorOutput(block, x, y int, processor VectorProcessor, image *VectorImage) *VectorOutput

func (*VectorOutput) Output

func (o *VectorOutput) Output(grid *qrencode.Grid, w io.Writer)

type VectorProcessor

type VectorProcessor func(*svg.SVG, int, int, int, uint8)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL