X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fdatamatrix%2Fdecoder%2FBitMatrixParser.java;fp=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fdatamatrix%2Fdecoder%2FBitMatrixParser.java;h=a14eb9514c50ee41dd1fc5e96e6057914c41a75f;hp=3bc61cd8d46d03355ba36ed6ad9026304dc6ecbe;hb=99934867e776f14b8b9ebc901db127b3255e5d8d;hpb=0ee5f7050379e4edac731b8bc15ff68b6e03949c diff --git a/core/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java b/core/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java index 3bc61cd8..a14eb951 100644 --- a/core/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java +++ b/core/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java @@ -40,7 +40,7 @@ final class BitMatrixParser { } version = readVersion(bitMatrix); - this.mappingBitMatrix = ExtractDataRegion(bitMatrix, version); + this.mappingBitMatrix = extractDataRegion(bitMatrix, version); // TODO(bbrown): Make this work for rectangular symbols this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getDimension()); } @@ -81,8 +81,6 @@ final class BitMatrixParser { byte[] result = new byte[version.getTotalCodewords()]; int resultOffset = 0; - int currentByte = 0; - int bitsRead = 0; int row = 4; int column = 0; @@ -144,10 +142,10 @@ final class BitMatrixParser { /** *

Reads a bit of the mapping matrix accounting for boundry wrapping.

* - * @param Row to read in the mapping matrix - * @param Column to read in the mapping matrix - * @param Number of rows in the mapping matrix - * @param Number of columns in the mapping matrix + * @param row Row to read in the mapping matrix + * @param column Column to read in the mapping matrix + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix * @return value of the given bit in the mapping matrix */ boolean readModule(int row, int column, int numRows, int numColumns) { @@ -169,10 +167,10 @@ final class BitMatrixParser { * *

See ISO 16022:2006, 5.8.1 Figure 6

* - * @param Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern - * @param Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern - * @param Number of rows in the mapping matrix - * @param Number of columns in the mapping matrix + * @param row Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + * @param column Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix * @return byte from the utah shape */ int readUtah(int row, int column, int numRows, int numColumns) { @@ -216,8 +214,8 @@ final class BitMatrixParser { * *

See ISO 16022:2006, Figure F.3

* - * @param Number of rows in the mapping matrix - * @param Number of columns in the mapping matrix + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix * @return byte from the Corner condition 1 */ int readCorner1(int numRows, int numColumns) { @@ -261,8 +259,8 @@ final class BitMatrixParser { * *

See ISO 16022:2006, Figure F.4

* - * @param Number of rows in the mapping matrix - * @param Number of columns in the mapping matrix + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix * @return byte from the Corner condition 2 */ int readCorner2(int numRows, int numColumns) { @@ -306,8 +304,8 @@ final class BitMatrixParser { * *

See ISO 16022:2006, Figure F.5

* - * @param Number of rows in the mapping matrix - * @param Number of columns in the mapping matrix + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix * @return byte from the Corner condition 3 */ int readCorner3(int numRows, int numColumns) { @@ -351,8 +349,8 @@ final class BitMatrixParser { * *

See ISO 16022:2006, Figure F.6

* - * @param Number of rows in the mapping matrix - * @param Number of columns in the mapping matrix + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix * @return byte from the Corner condition 4 */ int readCorner4(int numRows, int numColumns) { @@ -395,11 +393,11 @@ final class BitMatrixParser { *

Extracts the data region from a {@link BitMatrix} that contains * alignment patterns.

* - * @param bitMarix Original {@link BitMatrix} with alignment patterns + * @param bitMatrix Original {@link BitMatrix} with alignment patterns * @param version {@link Version} information corresponding with the bitMatrix * @return BitMatrix that has the alignment patterns removed */ - BitMatrix ExtractDataRegion(BitMatrix bitMatrix, Version version) { + BitMatrix extractDataRegion(BitMatrix bitMatrix, Version version) { int symbolSizeRows = version.getSymbolSizeRows(); int symbolSizeColumns = version.getSymbolSizeColumns();