| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 // Original code is licensed as follows: | 6 // Original code is licensed as follows: |
| 7 /* | 7 /* |
| 8 * Copyright 2011 ZXing authors | 8 * Copyright 2011 ZXing authors |
| 9 * | 9 * |
| 10 * Licensed under the Apache License, Version 2.0 (the "License"); | 10 * Licensed under the Apache License, Version 2.0 (the "License"); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 CBC_BarcodeMatrix::~CBC_BarcodeMatrix() { | 38 CBC_BarcodeMatrix::~CBC_BarcodeMatrix() { |
| 39 for (int32_t i = 0; i < m_matrix.GetSize(); i++) | 39 for (int32_t i = 0; i < m_matrix.GetSize(); i++) |
| 40 delete m_matrix.GetAt(i); | 40 delete m_matrix.GetAt(i); |
| 41 | 41 |
| 42 m_matrixOut.RemoveAll(); | 42 m_matrixOut.RemoveAll(); |
| 43 } | 43 } |
| 44 void CBC_BarcodeMatrix::set(int32_t x, int32_t y, uint8_t value) { | 44 void CBC_BarcodeMatrix::set(int32_t x, int32_t y, uint8_t value) { |
| 45 m_matrix[y]->set(x, value); | 45 m_matrix[y]->set(x, value); |
| 46 } | 46 } |
| 47 void CBC_BarcodeMatrix::setMatrix(int32_t x, int32_t y, FX_BOOL black) { | 47 void CBC_BarcodeMatrix::setMatrix(int32_t x, int32_t y, bool black) { |
| 48 set(x, y, (uint8_t)(black ? 1 : 0)); | 48 set(x, y, (uint8_t)(black ? 1 : 0)); |
| 49 } | 49 } |
| 50 void CBC_BarcodeMatrix::startRow() { | 50 void CBC_BarcodeMatrix::startRow() { |
| 51 ++m_currentRow; | 51 ++m_currentRow; |
| 52 } | 52 } |
| 53 CBC_BarcodeRow* CBC_BarcodeMatrix::getCurrentRow() { | 53 CBC_BarcodeRow* CBC_BarcodeMatrix::getCurrentRow() { |
| 54 return m_matrix[m_currentRow]; | 54 return m_matrix[m_currentRow]; |
| 55 } | 55 } |
| 56 int32_t CBC_BarcodeMatrix::getWidth() { | 56 int32_t CBC_BarcodeMatrix::getWidth() { |
| 57 return m_outWidth; | 57 return m_outWidth; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 79 if (i != 0) { | 79 if (i != 0) { |
| 80 bytearray.Copy(m_matrix[i / yScale]->getScaledRow(xScale)); | 80 bytearray.Copy(m_matrix[i / yScale]->getScaledRow(xScale)); |
| 81 } | 81 } |
| 82 k = i * xMax; | 82 k = i * xMax; |
| 83 for (int32_t l = 0; l < xMax; l++) { | 83 for (int32_t l = 0; l < xMax; l++) { |
| 84 m_matrixOut[k + l] = bytearray.GetAt(l); | 84 m_matrixOut[k + l] = bytearray.GetAt(l); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 return m_matrixOut; | 87 return m_matrixOut; |
| 88 } | 88 } |
| OLD | NEW |