qrencode

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: 2 Imported by: 0

Documentation

Overview

Package qrencode provides functions to generate QR codes.

Index

Constants

View Source
const (
	ECLevelM = ECLevel(0)
	ECLevelL = ECLevel(1)
	ECLevelH = ECLevel(2)
	ECLevelQ = ECLevel(3)
)
View Source
const (
	ElWhite = iota
	ElBlack
	ElBorLT
	ElBorRT
	ElBorLB
	ElBalLT
	ElBalRT
	ElBalLB
	ElBorAl
	ElBalAl
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ECLevel

type ECLevel int

type Grid

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

func Encode

func Encode(content string, ecLevel ECLevel) (*Grid, error)

QR encode the content at the specified error correction level (ecLevel).

func EncodeBytes

func EncodeBytes(content []byte, ecLevel ECLevel) (*Grid, error)

QR encode the content at the specified error correction level (ecLevel).

func NewGrid

func NewGrid(width, height int) *Grid

func (*Grid) Clear

func (g *Grid) Clear()

func (*Grid) Get

func (g *Grid) Get(x, y int) uint8

func (*Grid) Height

func (g *Grid) Height() int

func (*Grid) IsDark

func (g *Grid) IsDark(x, y int) bool

func (*Grid) IsEmpty

func (g *Grid) IsEmpty(x, y int) bool

func (*Grid) Set

func (g *Grid) Set(x, y int, v uint8)

func (*Grid) SetDark

func (g *Grid) SetDark(x, y int, v bool)

func (*Grid) String

func (g *Grid) String() string

func (*Grid) Width

func (g *Grid) Width() int

Jump to

Keyboard shortcuts

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