Added a clear() method to BitMatrix.

git-svn-id: https://zxing.googlecode.com/svn/trunk@979 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2009-06-23 21:05:09 +00:00
parent b613112615
commit 6367973b49

View file

@ -92,6 +92,16 @@ public final class BitMatrix {
bits[offset] ^= 1 << (x & 0x1f);
}
/**
* Clears all bits (sets to false).
*/
public void clear() {
int max = bits.length;
for (int i = 0; i < max; i++) {
bits[i] = 0;
}
}
/**
* <p>Sets a square region of the bit matrix to true.</p>
*