| 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 | 6 |
| 7 #ifndef XFA_SRC_FXBARCODE_DATAMATRIX_BC_DEFAULTPLACEMENT_H_ | 7 #ifndef XFA_SRC_FXBARCODE_DATAMATRIX_BC_DEFAULTPLACEMENT_H_ |
| 8 #define XFA_SRC_FXBARCODE_DATAMATRIX_BC_DEFAULTPLACEMENT_H_ | 8 #define XFA_SRC_FXBARCODE_DATAMATRIX_BC_DEFAULTPLACEMENT_H_ |
| 9 | 9 |
| 10 #include "core/include/fxcrt/fx_basic.h" |
| 11 |
| 10 class CBC_DefaultPlacement { | 12 class CBC_DefaultPlacement { |
| 11 public: | 13 public: |
| 12 CBC_DefaultPlacement(CFX_WideString codewords, | 14 CBC_DefaultPlacement(CFX_WideString codewords, |
| 13 int32_t numcols, | 15 int32_t numcols, |
| 14 int32_t numrows); | 16 int32_t numrows); |
| 15 virtual ~CBC_DefaultPlacement(); | 17 virtual ~CBC_DefaultPlacement(); |
| 16 | 18 |
| 17 int32_t getNumrows(); | 19 int32_t getNumrows(); |
| 18 int32_t getNumcols(); | 20 int32_t getNumcols(); |
| 19 CFX_ByteArray& getBits(); | 21 CFX_ByteArray& getBits(); |
| 20 FX_BOOL getBit(int32_t col, int32_t row); | 22 FX_BOOL getBit(int32_t col, int32_t row); |
| 21 void setBit(int32_t col, int32_t row, FX_BOOL bit); | 23 void setBit(int32_t col, int32_t row, FX_BOOL bit); |
| 22 FX_BOOL hasBit(int32_t col, int32_t row); | 24 FX_BOOL hasBit(int32_t col, int32_t row); |
| 23 void place(); | 25 void place(); |
| 24 | 26 |
| 25 private: | 27 private: |
| 26 CFX_WideString m_codewords; | 28 CFX_WideString m_codewords; |
| 27 int32_t m_numrows; | 29 int32_t m_numrows; |
| 28 int32_t m_numcols; | 30 int32_t m_numcols; |
| 29 CFX_ByteArray m_bits; | 31 CFX_ByteArray m_bits; |
| 30 void module(int32_t row, int32_t col, int32_t pos, int32_t bit); | 32 void module(int32_t row, int32_t col, int32_t pos, int32_t bit); |
| 31 void utah(int32_t row, int32_t col, int32_t pos); | 33 void utah(int32_t row, int32_t col, int32_t pos); |
| 32 void corner1(int32_t pos); | 34 void corner1(int32_t pos); |
| 33 void corner2(int32_t pos); | 35 void corner2(int32_t pos); |
| 34 void corner3(int32_t pos); | 36 void corner3(int32_t pos); |
| 35 void corner4(int32_t pos); | 37 void corner4(int32_t pos); |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 #endif // XFA_SRC_FXBARCODE_DATAMATRIX_BC_DEFAULTPLACEMENT_H_ | 40 #endif // XFA_SRC_FXBARCODE_DATAMATRIX_BC_DEFAULTPLACEMENT_H_ |
| OLD | NEW |