libqrencode

package
v0.0.0-...-97e6101 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

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

Jump to

Keyboard shortcuts

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