linear

package
v0.0.0-...-c704d6e Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2015 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

implements http://en.wikipedia.org/wiki/Codabar

msg := "1234567890"
f, _ := os.Create("codabar.png")
b := linear.NewCodabar(msg)
img := b.GetImage()
png.Encode(f, img)
f.Close()

implements http://en.wikipedia.org/wiki/Code_11

msg := "1917"
f, _ := os.Create("code11.png")
b := linear.NewCode11(msg)
img := b.GetImage()
png.Encode(f, img)
f.Close()

implements http://en.wikipedia.org/wiki/Code_39

msg := "GOBARCODE"
f, _ := os.Create("code39.png")
b := linear.NewCode39(msg)
img := b.GetImage()
png.Encode(f, img)
f.Close()

implements http://en.wikipedia.org/wiki/Code_93

msg := "TEST93"
f, _ := os.Create("code93.png")
b := linear.NewCode93(msg)
img := b.GetImage()
png.Encode(f, img)
f.Close()

implements http://en.wikipedia.org/wiki/Pharmacode

n := 69
f, _ := os.Create("pharmacode.png")
b := linear.NewPharmacode(n)
img := b.GetImage()
png.Encode(f, img)
f.Close()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codabar

type Codabar struct {
	Start, Stop         string
	BarWidth, BarHeight int
	DebugPrint          bool
	// contains filtered or unexported fields
}

func NewCodabar

func NewCodabar(msg string) *Codabar

func (*Codabar) GetImage

func (this *Codabar) GetImage() image.Image

type Code11

type Code11 struct {
	BarWidth, BarHeight int
	DebugPrint          bool
	// contains filtered or unexported fields
}

func NewCode11

func NewCode11(msg string) *Code11

func (*Code11) GetImage

func (this *Code11) GetImage() image.Image

type Code39

type Code39 struct {
	BarHeight, BarWidth int
	DebugPrint          bool
	// contains filtered or unexported fields
}

func NewCode39

func NewCode39(msg string) *Code39

func (*Code39) GetImage

func (this *Code39) GetImage() image.Image

type Code93

type Code93 struct {
	BarHeight, BarWidth int
	DebugPrint          bool
	// contains filtered or unexported fields
}

func NewCode93

func NewCode93(msg string) *Code93

func (*Code93) GetImage

func (this *Code93) GetImage() image.Image

type Pharmacode

type Pharmacode struct {
	BarWidth, BarHeight int
	// contains filtered or unexported fields
}

func NewPharmacode

func NewPharmacode(n int) *Pharmacode

func (*Pharmacode) GetImage

func (this *Pharmacode) GetImage() image.Image

Jump to

Keyboard shortcuts

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