static embedTypeInfo(ecLevel, maskPattern /*int*/, matrix) {
        const typeInfoBits = new BitArray();
        MatrixUtil.makeTypeInfoBits(ecLevel, maskPattern, typeInfoBits);
        for (let i = 0, size = typeInfoBits.getSize(); i < size; ++i) {
            // Place bits in LSB to MSB order.  LSB (least significant bit) is the last value in
            // "typeInfoBits".
            const bit = typeInfoBits.get(typeInfoBits.getSize() - 1 - i);
            // Type info bits at the left top corner. See 8.9 of JISX0510:2004 (p.46).
            const coordinates = MatrixUtil.TYPE_INFO_COORDINATES[i];
            const x1 = coordinates[0];
            const y1 = coordinates[1];
            matrix.setBoolean(x1, y1, bit);
            if (i < 8) {
                // Right top corner.
                const x2 = matrix.getWidth() - i - 1;
                const y2 = 8;
                matrix.setBoolean(x2, y2, bit);
            }
            else {
                // Left bottom corner.
                const x2 = 8;
                const y2 = matrix.getHeight() - 7 + (i - 8);
                matrix.setBoolean(x2, y2, bit);
            }
        }
    }
// Embed type information. On success, modify the matrix.
Embed type information. On success, modify the matrix.
Embed type information . On success modify the matrix .
static embedTypeInfo(ecLevel, maskPattern , matrix) {
        const typeInfoBits = new BitArray();
        MatrixUtil.makeTypeInfoBits(ecLevel, maskPattern, typeInfoBits);
        for (let i = 0, size = typeInfoBits.getSize(); i < size; ++i) {
            const bit = typeInfoBits.get(typeInfoBits.getSize() - 1 - i);
            const coordinates = MatrixUtil.TYPE_INFO_COORDINATES[i];
            const x1 = coordinates[0];
            const y1 = coordinates[1];
            matrix.setBoolean(x1, y1, bit);
            if (i < 8) {
                const x2 = matrix.getWidth() - i - 1;
                const y2 = 8;
                matrix.setBoolean(x2, y2, bit);
            }
            else {
                const x2 = 8;
                const y2 = matrix.getHeight() - 7 + (i - 8);
                matrix.setBoolean(x2, y2, bit);
            }
        }
    }
static embedTypeInfo ( ecLevel , maskPattern , matrix ) { const typeInfoBits = new BitArray ( ) ; MatrixUtil . makeTypeInfoBits ( ecLevel , maskPattern , typeInfoBits ) ; for ( let i = 0 , size = typeInfoBits . getSize ( ) ; i < size ; ++ i ) { const bit = typeInfoBits . get ( typeInfoBits . getSize ( ) - 1 - i ) ; const coordinates = MatrixUtil . TYPE_INFO_COORDINATES [ i ] ; const x1 = coordinates [ 0 ] ; const y1 = coordinates [ 1 ] ; matrix . setBoolean ( x1 , y1 , bit ) ; if ( i < 8 ) { const x2 = matrix . getWidth ( ) - i - 1 ; const y2 = 8 ; matrix . setBoolean ( x2 , y2 , bit ) ; } else { const x2 = 8 ; const y2 = matrix . getHeight ( ) - 7 + ( i - 8 ) ; matrix . setBoolean ( x2 , y2 , bit ) ; } } }
Embed type information.
Embed type information .
/*int*/ // Place bits in LSB to MSB order.  LSB (least significant bit) is the last value in // "typeInfoBits". // Type info bits at the left top corner. See 8.9 of JISX0510:2004 (p.46). // Right top corner. // Left bottom corner.