| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRALIGNMENTPATTERNFINDER_H_ | |
| 8 #define XFA_SRC_FXBARCODE_QRCODE_BC_QRALIGNMENTPATTERNFINDER_H_ | |
| 9 | |
| 10 #include "core/include/fxcrt/fx_basic.h" | |
| 11 #include "xfa/src/fxbarcode/utils.h" | |
| 12 | |
| 13 class CBC_CommonBitMatrix; | |
| 14 class CBC_QRAlignmentPattern; | |
| 15 | |
| 16 class CBC_QRAlignmentPatternFinder { | |
| 17 private: | |
| 18 CBC_CommonBitMatrix* m_image; | |
| 19 CFX_PtrArray m_possibleCenters; | |
| 20 int32_t m_startX; | |
| 21 int32_t m_startY; | |
| 22 int32_t m_width; | |
| 23 int32_t m_height; | |
| 24 FX_FLOAT m_moduleSize; | |
| 25 CFX_Int32Array m_crossCheckStateCount; | |
| 26 | |
| 27 public: | |
| 28 CBC_QRAlignmentPatternFinder(CBC_CommonBitMatrix* image, | |
| 29 int32_t startX, | |
| 30 int32_t startY, | |
| 31 int32_t width, | |
| 32 int32_t height, | |
| 33 FX_FLOAT moduleSize); | |
| 34 virtual ~CBC_QRAlignmentPatternFinder(); | |
| 35 FX_BOOL FoundPatternCross(const CFX_Int32Array& stateCount); | |
| 36 FX_FLOAT CrossCheckVertical(int32_t startI, | |
| 37 int32_t startJ, | |
| 38 int32_t maxCount, | |
| 39 int32_t originalStateCountTotal); | |
| 40 CBC_QRAlignmentPattern* Find(int32_t& e); | |
| 41 CBC_QRAlignmentPattern* HandlePossibleCenter(const CFX_Int32Array& stateCount, | |
| 42 int32_t i, | |
| 43 int32_t j); | |
| 44 static FX_FLOAT CenterFromEnd(const CFX_Int32Array& stateCount, int32_t end); | |
| 45 }; | |
| 46 | |
| 47 #endif // XFA_SRC_FXBARCODE_QRCODE_BC_QRALIGNMENTPATTERNFINDER_H_ | |
| OLD | NEW |