qrrsc.io/qr/libqrencode Index | Files

package libqrencode

import "rsc.io/qr/libqrencode"

Package libqrencode wraps the C libqrencode library. The qr package (in this package's parent directory) does not use any C wrapping. This code is here only for use during that package's tests.

Index

Types

type Chunk

type Chunk struct {
	Mode Mode
	Text string
}

type Code

type Code struct {
	Version int
	Width   int
	Pixel   [][]Pixel
	Scale   int
}

func Encode

func Encode(version Version, level Level, mode Mode, text string) (*Code, error)

func EncodeChunk

func EncodeChunk(version Version, level Level, chunk ...Chunk) (*Code, error)

func (*Code) At

func (c *Code) At(x, y int) color.Color

func (*Code) Bounds

func (c *Code) Bounds() image.Rectangle

func (*Code) ColorModel

func (*Code) ColorModel() color.Model

type Level

type Level int
const (
	L Level = C.QR_ECLEVEL_L
	M Level = C.QR_ECLEVEL_M
	Q Level = C.QR_ECLEVEL_Q
	H Level = C.QR_ECLEVEL_H
)

type Mode

type Mode int
const (
	Numeric      Mode = C.QR_MODE_NUM
	Alphanumeric Mode = C.QR_MODE_AN
	EightBit     Mode = C.QR_MODE_8
)

type Pixel

type Pixel int
const (
	Black Pixel = 1 << iota
	DataECC
	Format
	PVersion
	Timing
	Alignment
	Finder
	NonData
)

type Version

type Version int

Source Files

qrencode.go

Version
v0.2.0 (latest)
Published
Jun 5, 2018
Platform
windows/amd64
Imports
5 packages
Last checked
3 hours ago

Tools for package owners.