Documentation
¶
Index ¶
- func IntToRune(i int) rune
- func RuneToInt(r rune) int
- type BitArray
- func (b *BitArray) AppendBit(bit bool)
- func (b *BitArray) AppendBitArray(other *BitArray)
- func (b *BitArray) AppendBits(value int, numBits int) error
- func (b *BitArray) Clear()
- func (b *BitArray) Flip(i int)
- func (b *BitArray) Get(i int) bool
- func (b *BitArray) GetBitArray() []uint32
- func (b *BitArray) GetNextSet(from int) int
- func (b *BitArray) GetNextUnset(from int) int
- func (b *BitArray) GetSize() int
- func (b *BitArray) GetSizeInBytes() int
- func (b *BitArray) IsRange(start, end int, value bool) (bool, error)
- func (b *BitArray) Reverse()
- func (b *BitArray) Set(i int)
- func (b *BitArray) SetBulk(i int, newBits uint32)
- func (b *BitArray) SetRange(start, end int) error
- func (b *BitArray) String() string
- func (b *BitArray) ToBytes(bitOffset int, array []byte, offset, numBytes int)
- func (b *BitArray) Xor(other *BitArray) error
- type BitList
- func (bl *BitList) AddBit(bits ...bool)
- func (bl *BitList) AddBits(b int, count byte)
- func (bl *BitList) AddByte(b byte)
- func (bl *BitList) GetBit(index int) bool
- func (bl *BitList) GetBytes() []byte
- func (bl *BitList) IterateBytes() <-chan byte
- func (bl *BitList) Len() int
- func (bl *BitList) SetBit(index int, value bool)
- func (resBits *BitList) ToImageWithBarsRatio(width, height int, widthRatio float64) image.Image
- func (resBits *BitList) ToWideNarrowList(wideBarWidth, narrowBarWidth int) *WideNarrowList
- type BitMatrix
- func (b *BitMatrix) At(x, y int) color.Color
- func (b *BitMatrix) Bounds() image.Rectangle
- func (b *BitMatrix) Clear()
- func (b *BitMatrix) ColorModel() color.Model
- func (b *BitMatrix) Flip(x, y int)
- func (b *BitMatrix) FlipAll()
- func (b *BitMatrix) Get(x, y int) bool
- func (b *BitMatrix) GetBottomRightOnBit() []int
- func (b *BitMatrix) GetEnclosingRectangle() []int
- func (b *BitMatrix) GetHeight() int
- func (b *BitMatrix) GetRow(y int, row *BitArray) *BitArray
- func (b *BitMatrix) GetRowSize() int
- func (b *BitMatrix) GetTopLeftOnBit() []int
- func (b *BitMatrix) GetWidth() int
- func (b *BitMatrix) Rotate90()
- func (b *BitMatrix) Rotate180()
- func (b *BitMatrix) Set(x, y int)
- func (b *BitMatrix) SetRegion(left, top, width, height int) error
- func (b *BitMatrix) SetRow(y int, row *BitArray)
- func (b *BitMatrix) String() string
- func (b *BitMatrix) ToString(setString, unsetString string) string
- func (b *BitMatrix) ToStringWithLineSeparator(setString, unsetString, lineSeparator string) string
- func (b *BitMatrix) Unset(x, y int)
- func (b *BitMatrix) Xor(mask *BitMatrix) error
- type GFPoly
- func (gp *GFPoly) AddOrSubstract(other *GFPoly) *GFPoly
- func (gp *GFPoly) Degree() int
- func (gp *GFPoly) Divide(other *GFPoly) (quotient *GFPoly, remainder *GFPoly)
- func (gp *GFPoly) GetCoefficient(degree int) int
- func (gp *GFPoly) MultByMonominal(degree int, coeff int) *GFPoly
- func (gp *GFPoly) Multiply(other *GFPoly) *GFPoly
- func (gp *GFPoly) Zero() bool
- type GaloisField
- type ReedSolomonEncoder
- type WideNarrowList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BitArray ¶
type BitArray struct {
// contains filtered or unexported fields
}
func NewBitArray ¶
func NewEmptyBitArray ¶
func NewEmptyBitArray() *BitArray
func (*BitArray) AppendBitArray ¶
func (*BitArray) GetBitArray ¶
func (*BitArray) GetNextSet ¶
func (*BitArray) GetNextUnset ¶
func (*BitArray) GetSizeInBytes ¶
type BitList ¶
type BitList struct {
// contains filtered or unexported fields
}
BitList is a list that contains bits
func NewBitList ¶
NewBitList returns a new BitList with the given length all bits are initialize with false
func (*BitList) AddBits ¶
AddBits appends the last (LSB) 'count' bits of 'b' the the end of the list
func (*BitList) IterateBytes ¶
IterateBytes iterates through all bytes contained in the BitList
func (*BitList) ToImageWithBarsRatio ¶
func (*BitList) ToWideNarrowList ¶
func (resBits *BitList) ToWideNarrowList(wideBarWidth, narrowBarWidth int) *WideNarrowList
Converts BitList to useful representation for barcodes that have narrow / wide bars with variable bar ratio
type BitMatrix ¶
type BitMatrix struct {
// contains filtered or unexported fields
}
func NewBitMatrix ¶
func NewSquareBitMatrix ¶
func ParseBoolMapToBitMatrix ¶
func ParseStringToBitMatrix ¶
func (*BitMatrix) ColorModel ¶
func (*BitMatrix) GetBottomRightOnBit ¶
func (*BitMatrix) GetEnclosingRectangle ¶
func (*BitMatrix) GetRowSize ¶
func (*BitMatrix) GetTopLeftOnBit ¶
func (*BitMatrix) ToStringWithLineSeparator ¶
type GFPoly ¶
type GFPoly struct {
Coefficients []int
// contains filtered or unexported fields
}
func NewGFPoly ¶
func NewGFPoly(field *GaloisField, coefficients []int) *GFPoly
func NewMonominalPoly ¶
func NewMonominalPoly(field *GaloisField, degree int, coeff int) *GFPoly
func (*GFPoly) AddOrSubstract ¶
func (*GFPoly) GetCoefficient ¶
GetCoefficient returns the coefficient of x ^ degree
type GaloisField ¶
GaloisField encapsulates galois field arithmetics
func NewGaloisField ¶
func NewGaloisField(pp, fieldSize, b int) *GaloisField
NewGaloisField creates a new galois field
func (*GaloisField) AddOrSub ¶
func (gf *GaloisField) AddOrSub(a, b int) int
AddOrSub add or substract two numbers
func (*GaloisField) Invers ¶
func (gf *GaloisField) Invers(num int) int
func (*GaloisField) Multiply ¶
func (gf *GaloisField) Multiply(a, b int) int
Multiply multiplys two numbers
func (*GaloisField) Zero ¶
func (gf *GaloisField) Zero() *GFPoly
type ReedSolomonEncoder ¶
type ReedSolomonEncoder struct {
// contains filtered or unexported fields
}
func NewReedSolomonEncoder ¶
func NewReedSolomonEncoder(gf *GaloisField) *ReedSolomonEncoder
type WideNarrowList ¶
type WideNarrowList struct {
Data [][2]bool
// contains filtered or unexported fields
}
func (*WideNarrowList) GetBarWidth ¶
func (list *WideNarrowList) GetBarWidth(idx int) int
func (*WideNarrowList) GetTotalWidth ¶
func (list *WideNarrowList) GetTotalWidth() int
Click to show internal directories.
Click to hide internal directories.