diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-08-21 21:04:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-21 21:04:26 +0000 |
commit | b10aff29932d434b3e333f6a92d7d6edf574963d (patch) | |
tree | 04d715dfe02e9a95038f45450288d4316dac92a8 /fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp | |
parent | 3cfe89d632315b6bdae3264cc75fc5ed06d36f45 (diff) | |
download | pdfium-b10aff29932d434b3e333f6a92d7d6edf574963d.tar.xz |
Remove excessive padding above and below PDF417 barcodes.
Bug: pdfium:1135
Change-Id: Iea16a65a5eebcb914192eb49de17a2c4eda83320
Reviewed-on: https://pdfium-review.googlesource.com/40690
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp')
-rw-r--r-- | fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp b/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp index ca492b3c19..ebedbf6197 100644 --- a/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp +++ b/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp @@ -25,12 +25,12 @@ #include "third_party/base/ptr_util.h" CBC_BarcodeMatrix::CBC_BarcodeMatrix(int32_t height, int32_t width) { - m_matrix.resize(height + 2); + m_matrix.resize(height); for (size_t i = 0; i < m_matrix.size(); ++i) m_matrix[i] = pdfium::MakeUnique<CBC_BarcodeRow>((width + 4) * 17 + 1); m_width = width * 17; - m_height = height + 2; + m_height = height; m_currentRow = 0; m_outHeight = 0; m_outWidth = 0; @@ -44,7 +44,7 @@ void CBC_BarcodeMatrix::set(int32_t x, int32_t y, uint8_t value) { void CBC_BarcodeMatrix::setMatrix(int32_t x, int32_t y, bool black) { set(x, y, (uint8_t)(black ? 1 : 0)); } -void CBC_BarcodeMatrix::startRow() { +void CBC_BarcodeMatrix::nextRow() { ++m_currentRow; } std::vector<uint8_t>& CBC_BarcodeMatrix::getMatrix() { |