Tweaked drawFormatBits() and drawDummyFormatBits() to use end-exclusive range in second copy for clarity.

pull/134/head
Project Nayuki 6 years ago
parent badeca0dc9
commit 2f4b0e8fd8

@ -356,7 +356,7 @@ public final class QrCode {
setModule(14 - i, 8, getBit(bits, i)); setModule(14 - i, 8, getBit(bits, i));
// Draw second copy // Draw second copy
for (int i = 0; i <= 7; i++) for (int i = 0; i < 8; i++)
setModule(size - 1 - i, 8, getBit(bits, i)); setModule(size - 1 - i, 8, getBit(bits, i));
for (int i = 8; i < 15; i++) for (int i = 8; i < 15; i++)
setModule(8, size - 15 + i, getBit(bits, i)); setModule(8, size - 15 + i, getBit(bits, i));

@ -149,7 +149,7 @@ final class QrTemplate {
darkenFunctionModule(14 - i, 8, 0); darkenFunctionModule(14 - i, 8, 0);
// Draw second copy // Draw second copy
for (int i = 0; i <= 7; i++) for (int i = 0; i < 8; i++)
darkenFunctionModule(size - 1 - i, 8, 0); darkenFunctionModule(size - 1 - i, 8, 0);
for (int i = 8; i < 15; i++) for (int i = 8; i < 15; i++)
darkenFunctionModule(8, size - 15 + i, 0); darkenFunctionModule(8, size - 15 + i, 0);

Loading…
Cancel
Save