zint/backend/micqr.h
2008-11-05 08:43:13 +00:00

104 lines
3.6 KiB
C

/* micqr.h - Bit placement for Micro QR Code versions M1 - M4 */
/*
libzint - the open source barcode library
Copyright (C) 2008 Robin Stuart <zint@hotmail.co.uk>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
int fig11m1[] = {
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,19,18,
0,0,0,0,0,0,0,0,0,17,16,
0,0,0,0,0,0,0,0,0,15,14,
0,0,0,0,0,0,0,0,0,13,12,
0,0,0,0,0,0,0,0,0,11,10,
0,0,0,0,0,0,0,0,0,9,8,
0,0,0,0,0,0,0,0,0,7,6,
0,0,0,0,0,0,0,0,0,5,4,
0,35,33,29,28,27,26,21,20,3,2,
0,34,32,31,30,25,24,23,22,1,0
};
int fig11m2[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,25,24,23,22,
0,0,0,0,0,0,0,0,0,27,26,21,20,
0,0,0,0,0,0,0,0,0,29,28,19,18,
0,0,0,0,0,0,0,0,0,31,30,17,16,
0,0,0,0,0,0,0,0,0,33,32,15,14,
0,0,0,0,0,0,0,0,0,35,34,13,12,
0,0,0,0,0,0,0,0,0,37,36,11,10,
0,0,0,0,0,0,0,0,0,39,38,9,8,
0,73,72,71,70,57,56,55,54,41,40,7,6,
0,75,74,69,68,59,58,53,52,43,42,5,4,
0,77,76,67,66,61,60,51,50,45,44,3,2,
0,79,78,65,64,63,62,49,48,47,46,1,0
};
int fig11m3[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,83,82,29,28,27,26,
0,0,0,0,0,0,0,0,0,81,80,31,30,25,24,
0,0,0,0,0,0,0,0,0,79,78,33,32,23,22,
0,0,0,0,0,0,0,0,0,77,76,35,34,21,20,
0,0,0,0,0,0,0,0,0,75,74,37,36,19,18,
0,0,0,0,0,0,0,0,0,73,72,39,38,17,16,
0,0,0,0,0,0,0,0,0,71,70,41,40,15,14,
0,0,0,0,0,0,0,0,0,69,68,43,42,13,12,
0,131,130,109,108,107,106,85,84,67,66,45,44,11,10,
0,129,128,111,110,105,104,87,86,65,64,47,46,9,8,
0,127,126,113,112,103,102,89,88,63,62,49,48,7,6,
0,125,124,115,114,101,100,91,90,61,60,51,50,5,4,
0,123,122,117,116,99,98,93,92,59,58,53,52,3,2,
0,121,120,119,118,97,96,95,94,57,56,55,54,1,0
};
int fig11m4[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,97,96,95,94,33,32,31,30,
0,0,0,0,0,0,0,0,0,99,98,93,92,35,34,29,28,
0,0,0,0,0,0,0,0,0,101,100,91,90,37,36,27,26,
0,0,0,0,0,0,0,0,0,103,102,89,88,39,38,25,24,
0,0,0,0,0,0,0,0,0,105,104,87,86,41,40,23,22,
0,0,0,0,0,0,0,0,0,107,106,85,84,43,42,21,20,
0,0,0,0,0,0,0,0,0,109,108,83,82,45,44,19,18,
0,0,0,0,0,0,0,0,0,111,110,81,80,47,46,17,16,
0,177,176,175,174,145,144,143,142,113,112,79,78,49,48,15,14,
0,179,178,173,172,147,146,141,140,115,114,77,76,51,50,13,12,
0,181,180,171,170,149,148,139,138,117,116,75,74,53,52,11,10,
0,183,182,169,168,151,150,137,136,119,118,73,72,55,54,9,8,
0,185,184,167,166,153,152,135,134,121,120,70,69,57,56,7,6,
0,187,186,165,164,155,154,133,132,123,122,68,67,59,58,5,4,
0,189,188,163,162,157,156,131,130,125,124,66,65,61,60,3,2,
0,191,190,161,160,159,158,129,128,127,126,64,63,62,0,1,0
};
int finder[] = {
1,1,1,1,1,1,1,
1,0,0,0,0,0,1,
1,0,1,1,1,0,1,
1,0,1,1,1,0,1,
1,0,1,1,1,0,1,
1,0,0,0,0,0,1,
1,1,1,1,1,1,1
};
int tablec1[] = { 0x4445, 0x4172, 0x4e2b, 0x4b1c, 0x55ae, 0x5099, 0x5fc0, 0x5af7, 0x6793, 0x62a4, 0x6dfd, 0x68ca, 0x7678, 0x734f,
0x7c16, 0x7921, 0x06de, 0x03e9, 0x0cb0, 0x0987, 0x1735, 0x1202, 0x1d5b, 0x186c, 0x2508, 0x203f, 0x2f66, 0x2a51, 0x34e3,
0x31d4, 0x3e8d, 0x3bba
};