diff --git a/core/src/com/google/zxing/common/BitMatrix.java b/core/src/com/google/zxing/common/BitMatrix.java index b1689e7ff..6c5201d9d 100755 --- a/core/src/com/google/zxing/common/BitMatrix.java +++ b/core/src/com/google/zxing/common/BitMatrix.java @@ -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; + } + } + /** *

Sets a square region of the bit matrix to true.

*