mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Merge pull request #419 from awenger/master
Set PDF_417 lineThickness to 1
This commit is contained in:
commit
b4bd7a40e8
|
@ -97,9 +97,8 @@ public final class PDF417Writer implements Writer {
|
|||
int errorCorrectionLevel = 2;
|
||||
encoder.generateBarcodeLogic(contents, errorCorrectionLevel);
|
||||
|
||||
int lineThickness = 2;
|
||||
int aspectRatio = 4;
|
||||
byte[][] originalScale = encoder.getBarcodeMatrix().getScaledMatrix(lineThickness, aspectRatio * lineThickness);
|
||||
byte[][] originalScale = encoder.getBarcodeMatrix().getScaledMatrix(1, aspectRatio);
|
||||
boolean rotated = false;
|
||||
if ((height > width) ^ (originalScale[0].length < originalScale.length)) {
|
||||
originalScale = rotateArray(originalScale);
|
||||
|
@ -118,7 +117,7 @@ public final class PDF417Writer implements Writer {
|
|||
|
||||
if (scale > 1) {
|
||||
byte[][] scaledMatrix =
|
||||
encoder.getBarcodeMatrix().getScaledMatrix(scale * lineThickness, scale * aspectRatio * lineThickness);
|
||||
encoder.getBarcodeMatrix().getScaledMatrix(scale, scale * aspectRatio);
|
||||
if (rotated) {
|
||||
scaledMatrix = rotateArray(scaledMatrix);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue