POSITION_DETECTION_PATTERN
POSITION_DETECTION_PATTERN = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]
Position detection pattern.
Matrix utility.
POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE = [
[null, null, null, null, null, null, null],
// Version 1
[6, 18, null, null, null, null, null],
// Version 2
[6, 22, null, null, null, null, null],
// Version 3
[6, 26, null, null, null, null, null],
// Version 4
[6, 30, null, null, null, null, null],
// Version 5
[6, 34, null, null, null, null, null],
// Version 6
[6, 22, 38, null, null, null, null],
// Version 7
[6, 24, 42, null, null, null, null],
// Version 8
[6, 26, 46, null, null, null, null],
// Version 9
[6, 28, 50, null, null, null, null],
// Version 10
[6, 30, 54, null, null, null, null],
// Version 11
[6, 32, 58, null, null, null, null],
// Version 12
[6, 34, 62, null, null, null, null],
// Version 13
[6, 26, 46, 66, null, null, null],
// Version 14
[6, 26, 48, 70, null, null, null],
// Version 15
[6, 26, 50, 74, null, null, null],
// Version 16
[6, 30, 54, 78, null, null, null],
// Version 17
[6, 30, 56, 82, null, null, null],
// Version 18
[6, 30, 58, 86, null, null, null],
// Version 19
[6, 34, 62, 90, null, null, null],
// Version 20
[6, 28, 50, 72, 94, null, null],
// Version 21
[6, 26, 50, 74, 98, null, null],
// Version 22
[6, 30, 54, 78, 102, null, null],
// Version 23
[6, 28, 54, 80, 106, null, null],
// Version 24
[6, 32, 58, 84, 110, null, null],
// Version 25
[6, 30, 58, 86, 114, null, null],
// Version 26
[6, 34, 62, 90, 118, null, null],
// Version 27
[6, 26, 50, 74, 98, 122, null],
// Version 28
[6, 30, 54, 78, 102, 126, null],
// Version 29
[6, 26, 52, 78, 104, 130, null],
// Version 30
[6, 30, 56, 82, 108, 134, null],
// Version 31
[6, 34, 60, 86, 112, 138, null],
// Version 32
[6, 30, 58, 86, 114, 142, null],
// Version 33
[6, 34, 62, 90, 118, 146, null],
// Version 34
[6, 30, 54, 78, 102, 126, 150],
// Version 35
[6, 24, 50, 76, 102, 128, 154],
// Version 36
[6, 28, 54, 80, 106, 132, 158],
// Version 37
[6, 32, 58, 84, 110, 136, 162],
// Version 38
[6, 26, 54, 82, 110, 138, 166],
// Version 39
[6, 30, 58, 86, 114, 142, 170],
]
Coordinates for position adjustment patterns for each version.
buildMatrix(\BaconQrCode\Common\BitArray $dataBits, \BaconQrCode\Common\ErrorCorrectionLevel $level, \BaconQrCode\Common\Version $version, int $maskPattern, \BaconQrCode\Encoder\ByteMatrix $matrix) : void
Builds a complete matrix.
| \BaconQrCode\Common\BitArray | $dataBits | |
| \BaconQrCode\Common\ErrorCorrectionLevel | $level | |
| \BaconQrCode\Common\Version | $version | |
| int | $maskPattern | |
| \BaconQrCode\Encoder\ByteMatrix | $matrix |
makeTypeInfoBits(\BaconQrCode\Common\ErrorCorrectionLevel $level, int $maskPattern, \BaconQrCode\Common\BitArray $bits) : void
Generates type information bits and appends them to a bit array.
| \BaconQrCode\Common\ErrorCorrectionLevel | $level | |
| int | $maskPattern | |
| \BaconQrCode\Common\BitArray | $bits |
if bit array resulted in invalid size
makeVersionInfoBits(\BaconQrCode\Common\Version $version, \BaconQrCode\Common\BitArray $bits) : void
Generates version information bits and appends them to a bit array.
| \BaconQrCode\Common\Version | $version | |
| \BaconQrCode\Common\BitArray | $bits |
if bit array resulted in invalid size
embedHorizontalSeparationPattern(int $xStart, int $yStart, \BaconQrCode\Encoder\ByteMatrix $matrix) : void
Embeds a single horizontal separation pattern.
| int | $xStart | |
| int | $yStart | |
| \BaconQrCode\Encoder\ByteMatrix | $matrix |
if a byte was already set
embedVerticalSeparationPattern(int $xStart, int $yStart, \BaconQrCode\Encoder\ByteMatrix $matrix) : void
Embeds a single vertical separation pattern.
| int | $xStart | |
| int | $yStart | |
| \BaconQrCode\Encoder\ByteMatrix | $matrix |
if a byte was already set
embedDataBits(\BaconQrCode\Common\BitArray $dataBits, int $maskPattern, \BaconQrCode\Encoder\ByteMatrix $matrix) : void
Embeds "dataBits" using "getMaskPattern".
For debugging purposes, it skips masking process if "getMaskPattern" is -1. See 8.7 of JISX0510:2004 (p.38) for how to embed data bits.
| \BaconQrCode\Common\BitArray | $dataBits | |
| int | $maskPattern | |
| \BaconQrCode\Encoder\ByteMatrix | $matrix |
if not all bits could be consumed