From 6359bfddcc5868093418784fa2e972581ebd82b6 Mon Sep 17 00:00:00 2001 From: Leo Howell Date: Thu, 8 Oct 2009 14:48:28 +0900 Subject: render version bits --- lpg/libqr/code-layout.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lpg/libqr/code-layout.c') diff --git a/lpg/libqr/code-layout.c b/lpg/libqr/code-layout.c index 4be3871..ed01112 100644 --- a/lpg/libqr/code-layout.c +++ b/lpg/libqr/code-layout.c @@ -45,7 +45,14 @@ void qr_layout_init_mask(struct qr_code * code) if (x < 9 && y >= dim - 8) /* bottom-left */ continue; - /* XXX: format data */ + /* version info */ + if (code->version >= 7) { + if (y < 6 && x >= dim - 11) + continue; + if (x < 6 && y >= dim - 11) + continue; + } + /* XXX: alignment pattern */ row[off] |= bit; -- cgit v1.2.3-70-g09d2