bit matrix height
bit matrix width
Clears all bits (sets to false).
Flips the given bit.
The horizontal component (i.e. which column)
The vertical component (i.e. which row)
Gets the requested bit, where true means black.
The horizontal component (i.e. which column)
The vertical component (i.e. which row)
value of given bit in matrix
This is useful in detecting the enclosing rectangle of a 'pure' barcode.
{@code left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white
The height of the matrix
A fast method to retrieve one row of data from the matrix as a BitArray.
The row to retrieve
An optional caller-allocated BitArray, will be allocated if null or too small
The resulting BitArray - this reference should always be used even when passing your own row
The row size of the matrix
This is useful in detecting a corner of a 'pure' barcode.
{@code x,y} coordinate of top-left-most 1 bit, or null if it is all white
The width of the matrix
Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees
Sets the given bit to true.
The horizontal component (i.e. which column)
The vertical component (i.e. which row)
Sets a square region of the bit matrix to true.
The horizontal position to begin at (inclusive)
The vertical position to begin at (inclusive)
The width of the region
The height of the region
representation of a set bit
representation of an unset bit
newline character in string representation
string representation of entire matrix utilizing given strings and line separator
Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding mask bit is set.
XOR mask
Generated using TypeDoc
Represents a 2D matrix of bits. In function arguments below, and throughout the common module, x is the column position, and y is the row position. The ordering is always x, y. The origin is at the top-left.
Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins with a new int. This is done intentionally so that we can copy out a row into a BitArray very efficiently.
The ordering of bits is row-major. Within each int, the least significant bits are used first, meaning they represent lower x values. This is compatible with BitArray's implementation.
Sean Owen
dswitkin@google.com (Daniel Switkin)