BitMatrix

Bit matrix. * 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.

Members

Functions

clear
void clear()

Clears all bits (set to false).

flip
void flip(int x, int y)

Flips the given bit.

get
bool get(int x, int y)

Gets the requested bit, where true means black.

getBottomRightOnBit
int[] getBottomRightOnBit()

Gets the most bottom right set bit.

getEnclosingRectangle
int[] getEnclosingRectangle()

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

getRow
BitArray getRow(int y, BitArray row)

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

getTopLeftOnBit
int[] getTopLeftOnBit()

Gets the most top left set bit.

set
void set(int x, int y)

Sets the given bit to true.

setRegion
void setRegion(int left, int top, int width, int height)

Sets a square region of the bit matrix to true.

setRow
void setRow(int y, BitArray row)

Sets a row of data from a BitArray.

Meta