Properties

$width

$width : 

Type

$height

$height : 

Type

$rowSize

$rowSize : 

Type

$bits

$bits : 

Type

Methods

__construct()

__construct(  $width,   $height = false,   $rowSize = false,   $bits = false) 

Parameters

$width
$height
$rowSize
$bits

parse()

parse(  $stringRepresentation,   $setString,   $unsetString) 

Parameters

$stringRepresentation
$setString
$unsetString

set()

set(  $x,   $y) 

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

Parameters

$x

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

$y

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

_unset()

_unset(  $x,   $y) 

Parameters

$x
$y

flip()

flip(  $x,   $y) 

Parameters

$x
$y

_xor()

_xor(  $mask) 

Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding mask bit is set.

Parameters

$mask

; XOR mask

clear()

clear() 

Clears all bits (sets to false).

setRegion()

setRegion(  $left,   $top,   $width,   $height) 

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

Parameters

$left

; The horizontal position to begin at (inclusive)

$top

; The vertical position to begin at (inclusive)

$width

; The width of the region

$height

; The height of the region

rotate180()

rotate180() 

Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees

getWidth()

getWidth() : \Zxing\Common\The

Returns

\Zxing\Common\The —

width of the matrix

getRow()

getRow(  $y,   $row) : \Zxing\Common\The

A fast method to retrieve one row of data from the matrix as a BitArray.

Parameters

$y

; The row to retrieve

$row

; An optional caller-allocated BitArray, will be allocated if null or too small

Returns

\Zxing\Common\The —

resulting BitArray - this reference should always be used even when passing your own row

setRow()

setRow(  $y,   $row) 

Parameters

$y

; row to set

$row

; {@link BitArray} to copy from

getEnclosingRectangle()

getEnclosingRectangle() : \Zxing\Common\{@code

This is useful in detecting the enclosing rectangle of a 'pure' barcode.

Returns

\Zxing\Common\{@code —

left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white

getTopLeftOnBit()

getTopLeftOnBit() : \Zxing\Common\{@code

This is useful in detecting a corner of a 'pure' barcode.

Returns

\Zxing\Common\{@code —

x,y} coordinate of top-left-most 1 bit, or null if it is all white

getBottomRightOnBit()

getBottomRightOnBit() 

getHeight()

getHeight() : \Zxing\Common\The

Returns

\Zxing\Common\The —

height of the matrix

getRowSize()

getRowSize() : \Zxing\Common\The

Returns

\Zxing\Common\The —

row size of the matrix

equals()

equals(  $o) 

Parameters

$o

hashCode()

hashCode() 

toString()

toString(  $setString = '',   $unsetString = '',   $lineSeparator = '') 

Parameters

$setString
$unsetString
$lineSeparator

toString_()

toString_(  $setString,   $unsetString,   $lineSeparator) 

Parameters

$setString
$unsetString
$lineSeparator

get()

get(  $x,   $y) : \Zxing\Common\value

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

Parameters

$x

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

$y

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

Returns

\Zxing\Common\value —

of given bit in matrix

_clone()

_clone()