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:
srowen 2009-04-12 06:39:10 +00:00
parent dea0247615
commit 94915afb71
2 changed files with 5 additions and 5 deletions

View file

@ -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));

View file

@ -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);
} }