Documentation
¶
Index ¶
- Constants
- func AlphanumericValue(b byte) (int, bool)
- func ApplyMask(matrix [][]bool, maskPattern, version int)
- func BestEncodingMode(data []byte) int
- func BestMaskPattern(baseMatrix [][]bool, ecLevel, version int) int
- func BlockCount(version, ecLevel int) (int, int)
- func BuildMatrix(version int) [][]bool
- func Capacity(version, ecLevel, mode int) int
- func CloneMatrix(matrix [][]bool) [][]bool
- func DataCapacity(version, ecLevel int) int
- func DataCodewords(version, ecLevel int) int
- func ECCodewords(version, ecLevel int) int
- func EncodeEC(data []byte, ecCount int) []byte
- func EncodeECBlocks(dataBlocks [][]byte, ecPerBlock int) [][]byte
- func GeneratorPoly(degree int) []int
- func IsAlphanumeric(b byte) bool
- func IsNumeric(b byte) bool
- func MatrixSize(version int) int
- func MinVersionForData(dataLen, ecLevel int) (int, error)
- func NewMatrix(version int) [][]bool
- func PenaltyScore(matrix [][]bool, _ int) int
- func PlaceAlignmentPattern(matrix [][]bool, _, row, col int)
- func PlaceAllAlignmentPatterns(matrix [][]bool, version int)
- func PlaceAllFinderPatterns(matrix [][]bool, version int)
- func PlaceDarkModule(matrix [][]bool, version int)
- func PlaceDataBits(matrix [][]bool, dataBits []bool, version int)
- func PlaceFinderPattern(matrix [][]bool, row, col int)
- func PlaceFormatInfo(matrix [][]bool, ecLevel, maskPattern int)
- func PlaceTimingPatterns(matrix [][]bool, version int)
- func PlaceVersionInfo(matrix [][]bool, version int)
- func PrintMatrix(matrix [][]bool) string
- func RemoveMask(matrix [][]bool, maskPattern, version int)
- func VerifyMatrixSize(matrix [][]bool, version int) error
- type QRCode
- type VersionInfo
Constants ¶
View Source
const ( ModeNumeric = 1 ModeAlphanumeric = 2 ModeByte = 4 ModeKanji = 8 )
View Source
const ( ECLevelL = 0 ECLevelM = 1 ECLevelQ = 2 ECLevelH = 3 )
Variables ¶
This section is empty.
Functions ¶
func AlphanumericValue ¶
func BestEncodingMode ¶
func BestMaskPattern ¶
func BlockCount ¶
func BuildMatrix ¶
func CloneMatrix ¶
func DataCapacity ¶
func DataCodewords ¶
func ECCodewords ¶
func EncodeECBlocks ¶
func GeneratorPoly ¶
func IsAlphanumeric ¶
func MatrixSize ¶
func MinVersionForData ¶
func PenaltyScore ¶
func PlaceAlignmentPattern ¶
func PlaceAllFinderPatterns ¶
func PlaceDarkModule ¶
func PlaceDataBits ¶
func PlaceFinderPattern ¶
func PlaceFormatInfo ¶
func PlaceTimingPatterns ¶
func PlaceVersionInfo ¶
func PrintMatrix ¶
func RemoveMask ¶
func VerifyMatrixSize ¶
Types ¶
type QRCode ¶
type QRCode struct {
Version int
Size int
Modules [][]bool
ECLevel int
MaskPattern int
Data []byte
Metadata map[string]string
}
type VersionInfo ¶
type VersionInfo struct {
Version int
TotalCodewords int
DataCodewords int
ECBlocks int
ECCodewordsPerBlock int
NumGroups int
Group1Blocks int
Group1DataCodewords int
Group2Blocks int
Group2DataCodewords int
}
func GetVersionInfo ¶
func GetVersionInfo(version, ecLevel int) (*VersionInfo, error)
Click to show internal directories.
Click to hide internal directories.