private static void addFormatInfoEval ( byte [ ] eval , int size , EccLevel ecc_level , int pattern ) { int format = pattern ; int seq ; int i ; switch ( ecc_level ) { case L : format += 0x08 ; break ; case Q : format += 0x18 ; break ; case H : format += 0x10 ; break ; } seq = QR_ANNEX_C [ format ] ; for ( i = 0 ; i < 6 ; i ++ ) { eval [ ( i * size ) + 8 ] = ( byte ) ( ( ( ( seq >> i ) & 0x01 ) != 0 ) ? ( 0x01 >> pattern ) : 0x00 ) ; } for ( i = 0 ; i < 8 ; i ++ ) { eval [ ( 8 * size ) + ( size - i - 1 ) ] = ( byte ) ( ( ( ( seq >> i ) & 0x01 ) != 0 ) ? ( 0x01 >> pattern ) : 0x00 ) ; } for ( i = 0 ; i < 6 ; i ++ ) { eval [ ( 8 * size ) + ( 5 - i ) ] = ( byte ) ( ( ( ( seq >> ( i + 9 ) ) & 0x01 ) != 0 ) ? ( 0x01 >> pattern ) : 0x00 ) ; } for ( i = 0 ; i < 7 ; i ++ ) { eval [ ( ( ( size - 7 ) + i ) * size ) + 8 ] = ( byte ) ( ( ( ( seq >> ( i + 8 ) ) & 0x01 ) != 0 ) ? ( 0x01 >> pattern ) : 0x00 ) ; } eval [ ( 7 * size ) + 8 ] = ( byte ) ( ( ( ( seq >> 6 ) & 0x01 ) != 0 ) ? ( 0x01 >> pattern ) : 0x00 ) ; eval [ ( 8 * size ) + 8 ] = ( byte ) ( ( ( ( seq >> 7 ) & 0x01 ) != 0 ) ? ( 0x01 >> pattern ) : 0x00 ) ; eval [ ( 8 * size ) + 7 ] = ( byte ) ( ( ( ( seq >> 8 ) & 0x01 ) != 0 ) ? ( 0x01 >> pattern ) : 0x00 ) ; }
Adds format information to eval .