|
|
|
@ -215,13 +215,10 @@ public final class QrCode {
|
|
|
|
|
size + brd * 2))
|
|
|
|
|
.append("\t<rect width=\"100%\" height=\"100%\" fill=\"#FFFFFF\"/>\n")
|
|
|
|
|
.append("\t<path d=\"");
|
|
|
|
|
boolean head = true;
|
|
|
|
|
for (int y = 0; y < size; y++) {
|
|
|
|
|
for (int x = 0; x < size; x++) {
|
|
|
|
|
if (getModule(x, y)) {
|
|
|
|
|
if (head)
|
|
|
|
|
head = false;
|
|
|
|
|
else
|
|
|
|
|
if (x != 0 || y != 0)
|
|
|
|
|
sb.append(" ");
|
|
|
|
|
sb.append(String.format("M%d,%dh1v1h-1z", x + brd, y + brd));
|
|
|
|
|
}
|
|
|
|
@ -451,8 +448,6 @@ public final class QrCode {
|
|
|
|
|
// QR Code of the given version number and error correction level, with remainder bits discarded.
|
|
|
|
|
// This stateless pure function could be implemented as a (40*4)-cell lookup table.
|
|
|
|
|
static int getNumDataCodewords(int ver, Ecc ecl) {
|
|
|
|
|
if (ver < MIN_VERSION || ver > MAX_VERSION)
|
|
|
|
|
throw new IllegalArgumentException("Version number out of range");
|
|
|
|
|
return QrTemplate.getNumRawDataModules(ver) / 8
|
|
|
|
|
- ECC_CODEWORDS_PER_BLOCK[ecl.ordinal()][ver]
|
|
|
|
|
* NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal()][ver];
|
|
|
|
|