X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=csharp%2Fcommon%2FBitMatrix.cs;fp=csharp%2Fcommon%2FBitMatrix.cs;h=0000000000000000000000000000000000000000;hb=b2b0b0673099f79ff8a43852d5cb762739b497bb;hp=3d9a993394642077136f0b0c27dbebf17ed988e3;hpb=66affdb887502daf1213db55a0f0b348c5a74593;p=zxing.git
diff --git a/csharp/common/BitMatrix.cs b/csharp/common/BitMatrix.cs
deleted file mode 100755
index 3d9a9933..00000000
--- a/csharp/common/BitMatrix.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-* Copyright 2008 ZXing authors
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-namespace com.google.zxing.common
-{
- using System;
- using System.Text;
-
- ///
Sets the given bit to true.
- * - * @param i row offset - * @param j column offset - */ - public void set(int i, int j) { - int offset = i + dimension * j; - bits[offset >> 5] |= 1 << (offset & 0x1F); - } - - /** - *Sets a square region of the bit matrix to true.
- * - * @param topI row offset of region's top-left corner (inclusive) - * @param leftJ column offset of region's top-left corner (inclusive) - * @param height height of region - * @param width width of region - */ - public void setRegion(int topI, int leftJ, int height, int width) { - if (topI < 0 || leftJ < 0) { - throw new Exception("topI and leftJ must be nonnegative"); - } - if (height < 1 || width < 1) { - throw new Exception("height and width must be at least 1"); - } - int maxJ = leftJ + width; - int maxI = topI + height; - if (maxI > dimension || maxJ > dimension) { - throw new Exception( - "topI + height and leftJ + width must be <= matrix dimension"); - } - for (int j = leftJ; j < maxJ; j++) { - int jOffset = dimension * j; - for (int i = topI; i < maxI; i++) { - int offset = i + jOffset; - bits[offset >> 5] |= 1 << (offset & 0x1F); - } - } - } - - /** - * @return row/column dimension of this matrix - */ - public int getDimension() { - return dimension; - } - - /** - * @return array of ints holding internal representation of this matrix's bits - */ - public int[] getBits() { - return bits; - } - - public String toString() { - StringBuilder result = new StringBuilder(dimension * (dimension + 1)); - for (int i = 0; i < dimension; i++) { - for (int j = 0; j < dimension; j++) { - result.Append(get(i, j) ? "X " : " "); - } - result.Append('\n'); - } - return result.ToString(); - } - - } -} \ No newline at end of file