MaskPatternTester
Receives a QRDataInterface object and runs the mask pattern tests on it.
ISO/IEC 18004:2000 Section 8.8.2 - Evaluation of masking results
- Full name:
\chillerlan\QRCode\Data\MaskPatternTester
- This class is marked as final and can't be subclassed
- This class is a Final class
See Also:
- http://www.thonky.com/qr-code-tutorial/data-masking -
Properties
dataInterface
The data interface that contains the data matrix to test
Methods
__construct
Receives the QRDataInterface
Parameters:
Parameter | Type | Description |
---|---|---|
$dataInterface |
\chillerlan\QRCode\Data\QRDataInterface |
See Also:
- \chillerlan\QRCode\QROptions::$maskPattern - * \chillerlan\QRCode\Data\QRMatrix::$maskPattern -
getBestMaskPattern
shoves a QRMatrix through the MaskPatternTester to find the lowest penalty mask pattern
See Also:
- \chillerlan\QRCode\Data\MaskPatternTester -
testPattern
Returns the penalty for the given mask pattern
Parameters:
Parameter | Type | Description |
---|---|---|
$pattern |
int |
See Also:
- \chillerlan\QRCode\QROptions::$maskPattern - * \chillerlan\QRCode\Data\QRMatrix::$maskPattern -
testLevel1
Checks for each group of five or more same-colored modules in a row (or column)
Parameters:
Parameter | Type | Description |
---|---|---|
$m |
array | |
$size |
int |
testLevel2
Checks for each 2x2 area of same-colored modules in the matrix
Parameters:
Parameter | Type | Description |
---|---|---|
$m |
array | |
$size |
int |
testLevel3
Checks if there are patterns that look similar to the finder patterns (1:1:3:1:1 ratio)
Parameters:
Parameter | Type | Description |
---|---|---|
$m |
array | |
$size |
int |
testLevel4
Checks if more than half of the modules are dark or light, with a larger penalty for a larger difference
Parameters:
Parameter | Type | Description |
---|---|---|
$m |
array | |
$size |
int |
Automatically generated on 2025-03-18