mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Enable DataMatrix in the web app / other small tweaks (forgot one class!); also fix a small bug in QRCodeWriter
git-svn-id: https://zxing.googlecode.com/svn/trunk@904 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
dea0247615
commit
94915afb71
|
@ -18,6 +18,7 @@ package com.google.zxing;
|
||||||
|
|
||||||
import com.google.zxing.oned.MultiFormatOneDReader;
|
import com.google.zxing.oned.MultiFormatOneDReader;
|
||||||
import com.google.zxing.qrcode.QRCodeReader;
|
import com.google.zxing.qrcode.QRCodeReader;
|
||||||
|
import com.google.zxing.datamatrix.DataMatrixReader;
|
||||||
|
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
@ -107,10 +108,9 @@ public final class MultiFormatReader implements Reader {
|
||||||
if (possibleFormats.contains(BarcodeFormat.QR_CODE)) {
|
if (possibleFormats.contains(BarcodeFormat.QR_CODE)) {
|
||||||
readers.addElement(new QRCodeReader());
|
readers.addElement(new QRCodeReader());
|
||||||
}
|
}
|
||||||
// TODO re-enable once Data Matrix is ready
|
if (possibleFormats.contains(BarcodeFormat.DATAMATRIX)) {
|
||||||
//if (possibleFormats.contains(BarcodeFormat.DATAMATRIX)) {
|
readers.addElement(new DataMatrixReader());
|
||||||
// readers.addElement(new DataMatrixReader());
|
}
|
||||||
//}
|
|
||||||
// At end in "try harder" mode
|
// At end in "try harder" mode
|
||||||
if (addOneDReader && tryHarder) {
|
if (addOneDReader && tryHarder) {
|
||||||
readers.addElement(new MultiFormatOneDReader(hints));
|
readers.addElement(new MultiFormatOneDReader(hints));
|
||||||
|
|
|
@ -67,7 +67,7 @@ public final class QRCodeWriter implements Writer {
|
||||||
}
|
}
|
||||||
|
|
||||||
QRCode code = new QRCode();
|
QRCode code = new QRCode();
|
||||||
Encoder.encode(contents, errorCorrectionLevel, code);
|
Encoder.encode(contents, errorCorrectionLevel, hints, code);
|
||||||
return renderResult(code, width, height);
|
return renderResult(code, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue