package module
Version: v0.0.0-...-9665b14 Latest Latest

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

Go to latest
Published: Nov 16, 2021 License: BSD-3-Clause Imports: 27 Imported by: 0




This section is empty.


This section is empty.


func Arrow

func Arrow(w http.ResponseWriter, req *http.Request)

Arrow handles a request for an arrow pointing in a given direction.

func BitsTable

func BitsTable(w http.ResponseWriter, req *http.Request)

func Draw

func Draw(w http.ResponseWriter, req *http.Request)

Draw is the handler for drawing a QR code.

func Encode

func Encode(w http.ResponseWriter, req *http.Request)

Encode encodes a string using the given version, level, and mask.

func Frame

func Frame(w http.ResponseWriter, req *http.Request)

Frame handles a request for a single QR frame.

func Frames

func Frames(w http.ResponseWriter, req *http.Request)

Frames handles a request for multiple QR frames.

func Mask

func Mask(w http.ResponseWriter, req *http.Request)

Mask handles a request for a single QR mask.

func Masks

func Masks(w http.ResponseWriter, req *http.Request)

Masks handles a request for multiple QR masks.

func Show

func Show(w http.ResponseWriter, req *http.Request)

Show is the handler for showing a stored QR code.


type BitBlock

type BitBlock struct {
	DataBytes  int
	CheckBytes int
	B          []byte
	M          [][]byte
	Tmp        []byte
	RS         *gf256.RSEncoder
	// contains filtered or unexported fields

type Image

type Image struct {
	Name     string
	Target   [][]int
	Dx       int
	Dy       int
	URL      string
	Tag      string
	Version  int
	Mask     int
	Scale    int
	Rotation int
	Size     int

	// RandControl says to pick the pixels randomly.
	RandControl bool
	Seed        int64

	// Dither says to dither instead of using threshold pixel layout.
	Dither bool

	// OnlyDataBits says to use only data bits, not check bits.
	OnlyDataBits bool

	// Code is the final QR code.
	Code *qr.Code

	// Control is a PNG showing the pixels that we controlled.
	// Pixels we don't control are grayed out.
	SaveControl bool
	Control     []byte

func (*Image) Encode

func (m *Image) Encode(req *http.Request) error
func (m *Image) Link() string

func (*Image) Small

func (m *Image) Small() bool

type Pixinfo

type Pixinfo struct {
	X        int
	Y        int
	Pix      coding.Pixel
	Targ     byte
	DTarg    int
	Contrast int
	HardZero bool
	Block    *BitBlock
	Bit      uint

type Pixorder

type Pixorder struct {
	Off      int
	Priority int

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

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