mirror of
https://github.com/zxing/zxing.git
synced 2025-01-27 11:01:00 -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;
|
int errorCorrectionLevel = 2;
|
||||||
encoder.generateBarcodeLogic(contents, errorCorrectionLevel);
|
encoder.generateBarcodeLogic(contents, errorCorrectionLevel);
|
||||||
|
|
||||||
int lineThickness = 2;
|
|
||||||
int aspectRatio = 4;
|
int aspectRatio = 4;
|
||||||
byte[][] originalScale = encoder.getBarcodeMatrix().getScaledMatrix(lineThickness, aspectRatio * lineThickness);
|
byte[][] originalScale = encoder.getBarcodeMatrix().getScaledMatrix(1, aspectRatio);
|
||||||
boolean rotated = false;
|
boolean rotated = false;
|
||||||
if ((height > width) ^ (originalScale[0].length < originalScale.length)) {
|
if ((height > width) ^ (originalScale[0].length < originalScale.length)) {
|
||||||
originalScale = rotateArray(originalScale);
|
originalScale = rotateArray(originalScale);
|
||||||
|
@ -118,7 +117,7 @@ public final class PDF417Writer implements Writer {
|
||||||
|
|
||||||
if (scale > 1) {
|
if (scale > 1) {
|
||||||
byte[][] scaledMatrix =
|
byte[][] scaledMatrix =
|
||||||
encoder.getBarcodeMatrix().getScaledMatrix(scale * lineThickness, scale * aspectRatio * lineThickness);
|
encoder.getBarcodeMatrix().getScaledMatrix(scale, scale * aspectRatio);
|
||||||
if (rotated) {
|
if (rotated) {
|
||||||
scaledMatrix = rotateArray(scaledMatrix);
|
scaledMatrix = rotateArray(scaledMatrix);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue