aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/code-common.c
diff options
context:
space:
mode:
authorLeo Howell <leo@lwh.jp>2009-11-03 00:12:30 +0900
committerLeo Howell <leo@lwh.jp>2009-11-03 15:30:52 +0900
commit688c1b52ed356d024ba2e72ba52f7da64b7d74ed (patch)
treea68195f38f309e6aecc20f9b85318890417c477e /lpg/libqr/code-common.c
parent4eee8658be637fde410f429e69e86b034cd39185 (diff)
downloadpdf-simple-sign-688c1b52ed356d024ba2e72ba52f7da64b7d74ed.tar.gz
pdf-simple-sign-688c1b52ed356d024ba2e72ba52f7da64b7d74ed.tar.xz
pdf-simple-sign-688c1b52ed356d024ba2e72ba52f7da64b7d74ed.zip
generate alignment pattern
Diffstat (limited to 'lpg/libqr/code-common.c')
-rw-r--r--lpg/libqr/code-common.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/lpg/libqr/code-common.c b/lpg/libqr/code-common.c
index 150dfc5..7c3c119 100644
--- a/lpg/libqr/code-common.c
+++ b/lpg/libqr/code-common.c
@@ -38,3 +38,46 @@ size_t code_total_capacity(int version)
return side * side - function_bits;
}
+const int QR_ALIGNMENT_LOCATION[40][7] = {
+ { 0, 0, 0, 0, 0, 0, 0 }, /* 1 */
+ { 6, 18, 0, 0, 0, 0, 0 }, /* 2 */
+ { 6, 22, 0, 0, 0, 0, 0 }, /* 3 */
+ { 6, 26, 0, 0, 0, 0, 0 }, /* 4 */
+ { 6, 30, 0, 0, 0, 0, 0 }, /* 5 */
+ { 6, 34, 0, 0, 0, 0, 0 }, /* 6 */
+ { 6, 22, 38, 0, 0, 0, 0 }, /* 7 */
+ { 6, 24, 42, 0, 0, 0, 0 }, /* 8 */
+ { 6, 26, 46, 0, 0, 0, 0 }, /* 9 */
+ { 6, 28, 50, 0, 0, 0, 0 }, /* 10 */
+ { 6, 30, 54, 0, 0, 0, 0 }, /* 11 */
+ { 6, 32, 58, 0, 0, 0, 0 }, /* 12 */
+ { 6, 34, 62, 0, 0, 0, 0 }, /* 13 */
+ { 6, 26, 46, 66, 0, 0, 0 }, /* 14 */
+ { 6, 26, 48, 70, 0, 0, 0 }, /* 15 */
+ { 6, 26, 50, 74, 0, 0, 0 }, /* 16 */
+ { 6, 30, 54, 78, 0, 0, 0 }, /* 17 */
+ { 6, 30, 56, 82, 0, 0, 0 }, /* 18 */
+ { 6, 30, 58, 86, 0, 0, 0 }, /* 19 */
+ { 6, 34, 62, 90, 0, 0, 0 }, /* 20 */
+ { 6, 28, 50, 72, 94, 0, 0 }, /* 21 */
+ { 6, 26, 50, 74, 98, 0, 0 }, /* 22 */
+ { 6, 30, 54, 78,102, 0, 0 }, /* 23 */
+ { 6, 28, 54, 80,106, 0, 0 }, /* 24 */
+ { 6, 32, 58, 84,110, 0, 0 }, /* 25 */
+ { 6, 30, 58, 86,114, 0, 0 }, /* 26 */
+ { 6, 34, 62, 90,118, 0, 0 }, /* 27 */
+ { 6, 26, 50, 74, 98,122, 0 }, /* 28 */
+ { 6, 30, 54, 78,102,126, 0 }, /* 29 */
+ { 6, 26, 52, 78,104,130, 0 }, /* 30 */
+ { 6, 30, 56, 82,108,134, 0 }, /* 31 */
+ { 6, 34, 60, 86,112,138, 0 }, /* 32 */
+ { 6, 30, 58, 86,114,142, 0 }, /* 33 */
+ { 6, 34, 62, 90,118,146, 0 }, /* 34 */
+ { 6, 30, 54, 78,102,126,150 }, /* 35 */
+ { 6, 24, 50, 76,102,128,154 }, /* 36 */
+ { 6, 28, 54, 80,106,132,158 }, /* 37 */
+ { 6, 32, 58, 84,110,136,162 }, /* 38 */
+ { 6, 26, 54, 82,110,138,166 }, /* 39 */
+ { 6, 30, 58, 86,114,142,170 }, /* 40 */
+};
+