diff options
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | fxbarcode/pdf417/BC_PDF417Writer.cpp | 9 | ||||
-rw-r--r-- | testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png | bin | 10547 -> 10717 bytes | |||
-rw-r--r-- | xfa/fwl/cfx_barcode_unittest.cpp | 2 |
4 files changed, 5 insertions, 8 deletions
@@ -29,7 +29,7 @@ vars = { 'jinja2_revision': '45571de473282bd1d8b63a8dfcb1fd268d0635d2', 'jpeg_turbo_revision': '7260e4d8b8e1e40b17f03fafdf1cd83296900f76', 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783', - 'pdfium_tests_revision': '62a57ad4d90cf1f68f41c24da7ea413750336235', + 'pdfium_tests_revision': '0121d24bf42e437bea80dffe251cccf013482551', 'skia_revision': '588f879677d4f36e16a42dd96876534f104c2e2f', 'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6', 'trace_event_revision': '211b3ed9d0481b4caddbee1322321b86a483ca1f', diff --git a/fxbarcode/pdf417/BC_PDF417Writer.cpp b/fxbarcode/pdf417/BC_PDF417Writer.cpp index 4fec974737..026c89a59d 100644 --- a/fxbarcode/pdf417/BC_PDF417Writer.cpp +++ b/fxbarcode/pdf417/BC_PDF417Writer.cpp @@ -63,15 +63,13 @@ uint8_t* CBC_PDF417Writer::Encode(const WideString& contents, if (!encoder.generateBarcodeLogic(contents, m_iCorrectLevel)) return nullptr; - int32_t lineThickness = 2; - int32_t aspectRatio = 4; CBC_BarcodeMatrix* barcodeMatrix = encoder.getBarcodeMatrix(); - std::vector<uint8_t> originalScale = barcodeMatrix->getScaledMatrix( - lineThickness, aspectRatio * lineThickness); + std::vector<uint8_t> originalScale = barcodeMatrix->getMatrix(); int32_t width = outWidth; int32_t height = outHeight; outWidth = barcodeMatrix->getWidth(); outHeight = barcodeMatrix->getHeight(); + bool rotated = false; if ((height > width) ^ (outWidth < outHeight)) { rotateArray(originalScale, outHeight, outWidth); @@ -84,8 +82,7 @@ uint8_t* CBC_PDF417Writer::Encode(const WideString& contents, int32_t scaleY = height / outHeight; int32_t scale = std::min(scaleX, scaleY); if (scale > 1) { - originalScale = barcodeMatrix->getScaledMatrix( - scale * lineThickness, scale * aspectRatio * lineThickness); + originalScale = barcodeMatrix->getScaledMatrix(scale); if (rotated) { rotateArray(originalScale, outHeight, outWidth); int32_t temp = outHeight; diff --git a/testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png Binary files differindex 2e668afc9a..b56b826839 100644 --- a/testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png +++ b/testing/resources/pixel/xfa_specific/barcode_test_expected.pdf.0.png diff --git a/xfa/fwl/cfx_barcode_unittest.cpp b/xfa/fwl/cfx_barcode_unittest.cpp index 0c8a05fece..4b1dc059ce 100644 --- a/xfa/fwl/cfx_barcode_unittest.cpp +++ b/xfa/fwl/cfx_barcode_unittest.cpp @@ -125,7 +125,7 @@ TEST_F(BarcodeTest, Pdf417) { EXPECT_TRUE(Create(BC_PDF417)); EXPECT_TRUE(barcode()->Encode(L"clams")); RenderDevice(); - EXPECT_EQ("2bdb9b39f20c5763da6a0d7c7b1f6933", BitmapChecksum()); + EXPECT_EQ("3a154001167ff0b8511b72677dd4c5a4", BitmapChecksum()); } TEST_F(BarcodeTest, DataMatrix) { |