Lines Matching defs:mask

124 	 * the version. The mask number is either between 0 to 7 (inclusive) to force that
125 * mask, or −1 to automatically choose an appropriate mask (which may be slow).
134 * @param mask the mask number to use (between 0 and 7 (inclusive)), or −1 for automatic mask
139 * or −1 ≤ mask ≤ 7 is violated
143 public static QrCode encodeSegments(List<QrSegment> segs, Ecc ecl, int minVersion, int maxVersion, int mask, boolean boostEcl) {
146 if (!(MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= MAX_VERSION) || mask < -1 || mask > 7)
192 return new QrCode(version, ecl, bb.getBytes(), mask);
212 /** The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).
213 * <p>Even if a QR Code is created with automatic masking requested (mask =
214 * &#x2212;1), the resulting object still has a mask value between 0 and 7. */
215 public final int mask;
227 * error correction level, data codeword bytes, and mask number.
233 * @param msk the mask pattern to use, which is either &#x2212;1 for automatic choice or from 0 to 7 for fixed choice
235 * @throws IllegalArgumentException if the version or mask value is out of range,
255 mask = handleConstructorMasking(tpl.masks, msk);
284 // based on the given mask and this object's error correction level field.
287 int data = errorCorrectionLevel.formatBits << 3 | msk; // errCorrLvl is uint2, mask is uint3
375 // XORs the codeword modules in this QR Code with the given mask pattern.
378 // the same mask value a second time will undo the mask. A final well-formed
379 // QR Code needs exactly one (not zero, two, etc.) mask applied.
389 // method is called. The 'mask' argument is the requested mask, which is -1 for auto or 0 to 7 for fixed.
390 // This method applies and returns the actual mask chosen, from 0 to 7.
392 if (msk == -1) { // Automatically choose best mask
402 applyMask(masks[i]); // Undoes the mask due to XOR
406 applyMask(masks[msk]); // Apply the final choice of mask
413 // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.
546 // For use in getPenaltyScore(), when evaluating which mask is best.