Documentation

BitMatrix
in package

Table of Contents

$bits  : array<string|int, mixed>
$dimension  : int
$rowSize  : int
__construct()  : mixed
buildFunctionPattern()  : BitMatrix
See ISO 18004:2006 Annex E
flip()  : void
<p>Flips the given bit. 1 << (0xf9 & 0x1f)</p>
get()  : bool
<p>Gets the requested bit, where true means black.</p>
getDimension()  : int
mirror()  : void
Mirror the bit matrix in order to attempt a second reading.
set()  : void
<p>Sets the given bit to true.</p>
setRegion()  : void
<p>Sets a square region of the bit matrix to true.</p>
unmask()  : void
Implementations of this method reverse the data masking process applied to a QR Code and make its bits ready to read.

Properties

$bits

private array<string|int, mixed> $bits

Methods

__construct()

public __construct(int $dimension) : mixed
Parameters
$dimension : int
Return values
mixed

flip()

<p>Flips the given bit. 1 << (0xf9 & 0x1f)</p>

public flip(int $x, int $y) : void
Parameters
$x : int

; The horizontal component (i.e. which column)

$y : int

; The vertical component (i.e. which row)

Return values
void

get()

<p>Gets the requested bit, where true means black.</p>

public get(int $x, int $y) : bool
Parameters
$x : int

The horizontal component (i.e. which column)

$y : int

The vertical component (i.e. which row)

Return values
bool

value of given bit in matrix

getDimension()

public getDimension() : int
Return values
int

The dimension (width/height) of the matrix

mirror()

Mirror the bit matrix in order to attempt a second reading.

public mirror() : void
Return values
void

set()

<p>Sets the given bit to true.</p>

public set(int $x, int $y) : void
Parameters
$x : int

; The horizontal component (i.e. which column)

$y : int

; The vertical component (i.e. which row)

Return values
void

setRegion()

<p>Sets a square region of the bit matrix to true.</p>

public setRegion(int $left, int $top, int $width, int $height) : void
Parameters
$left : int

; The horizontal position to begin at (inclusive)

$top : int

; The vertical position to begin at (inclusive)

$width : int

; The width of the region

$height : int

; The height of the region

Tags
throws
InvalidArgumentException
Return values
void

unmask()

Implementations of this method reverse the data masking process applied to a QR Code and make its bits ready to read.

public unmask(int $dimension, MaskPattern $maskPattern) : void
Parameters
$dimension : int
$maskPattern : MaskPattern
Return values
void

Search results