Documentation

MaskPattern
in package

ISO/IEC 18004:2000 Section 8.8.1

Table of Contents

PATTERN_000  = 0b0
PATTERN_001  = 0b1
PATTERN_010  = 0b10
PATTERN_011  = 0b11
PATTERN_100  = 0b100
PATTERN_101  = 0b101
PATTERN_110  = 0b110
PATTERN_111  = 0b111
PATTERNS  = [self::PATTERN_000, self::PATTERN_001, self::PATTERN_010, self::PATTERN_011, self::PATTERN_100, self::PATTERN_101, self::PATTERN_110, self::PATTERN_111]
$maskPattern  : int
The current mask pattern value (0-7)
__construct()  : mixed
MaskPattern constructor.
getMask()  : Closure
Returns a closure that applies the mask for the chosen mask pattern.
getPattern()  : int
Returns the current mask pattern

Constants

PATTERNS

public array<string|int, int> PATTERNS = [self::PATTERN_000, self::PATTERN_001, self::PATTERN_010, self::PATTERN_011, self::PATTERN_100, self::PATTERN_101, self::PATTERN_110, self::PATTERN_111]

Properties

$maskPattern

The current mask pattern value (0-7)

private int $maskPattern

Methods

__construct()

MaskPattern constructor.

public __construct(int $maskPattern) : mixed
Parameters
$maskPattern : int
Tags
throws
QRCodeException
Return values
mixed

getMask()

Returns a closure that applies the mask for the chosen mask pattern.

public getMask() : Closure

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, including areas used for finder patterns, timing patterns, etc. These areas should be unused after the point they are unmasked anyway.

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position and j is row position. In fact, as the text says, i is row position and j is column position.

Tags
see
https://www.thonky.com/qr-code-tutorial/mask-patterns
see
https://github.com/zxing/zxing/blob/e9e2bd280bcaeabd59d0f955798384fe6c018a6c/core/src/main/java/com/google/zxing/qrcode/decoder/DataMask.java#L32-L117
Return values
Closure

getPattern()

Returns the current mask pattern

public getPattern() : int
Return values
int

Search results