MCPcopy Index your code
hub / github.com/zxing-js/library / readModule

Method readModule

src/core/datamatrix/decoder/BitMatrixParser.ts:155–167  ·  view source on GitHub ↗

* Reads a bit of the mapping matrix accounting for boundary wrapping. * * @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

(row: number, column: number, numRows: number, numColumns: number)

Source from the content-addressed store, hash-verified

153 * @return value of the given bit in the mapping matrix
154 */
155 private readModule(row: number, column: number, numRows: number, numColumns: number): boolean {
156 // Adjust the row and column indices based on boundary wrapping
157 if (row < 0) {
158 row += numRows;
159 column += 4 - ((numRows + 4) & 0x07);
160 }
161 if (column < 0) {
162 column += numColumns;
163 row += 4 - ((numColumns + 4) & 0x07);
164 }
165 this.readMappingMatrix.set(column, row);
166 return this.mappingBitMatrix.get(column, row);
167 }
168
169 /**
170 * <p>Reads the 8 bits of the standard Utah-shaped pattern.</p>

Callers 5

readUtahMethod · 0.95
readCorner1Method · 0.95
readCorner2Method · 0.95
readCorner3Method · 0.95
readCorner4Method · 0.95

Calls 2

setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected