From 047ea220f02757519e5a9d17a4b86075e7e9af32 Mon Sep 17 00:00:00 2001 From: George MacKerron Date: Fri, 27 Jan 2017 19:39:05 +0000 Subject: [PATCH] Reduced x and y bounds to stop (not) drawing borders in drawCanvas --- javascript/qrcodegen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index 493b3d3..ba33689 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -202,8 +202,8 @@ var qrcodegen = new function() { ctx.fillRect(0, 0, width, width); } ctx.fillStyle = dark; - for (var y = -border; y < size + border; y++) { - for (var x = -border; x < size + border; /* no-op */) { + for (var y = 0; y < size; y++) { + for (var x = 0; x < size; /* no-op */) { var moduleIsDark = this.getModule(x, y) == 1; for (var w = 1; w < size + border - x; w ++) if (this.getModule(x + w, y) != moduleIsDark) break; x += w;