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 2007 ZXing authors | 8 * Copyright 2007 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 19 matching lines...) Expand all Loading... |
30 int32_t startX, | 30 int32_t startX, |
31 int32_t startY, | 31 int32_t startY, |
32 int32_t width, | 32 int32_t width, |
33 int32_t height, | 33 int32_t height, |
34 FX_FLOAT moduleSize) | 34 FX_FLOAT moduleSize) |
35 : m_image(image), | 35 : m_image(image), |
36 m_startX(startX), | 36 m_startX(startX), |
37 m_startY(startY), | 37 m_startY(startY), |
38 m_width(width), | 38 m_width(width), |
39 m_height(height), | 39 m_height(height), |
40 m_moduleSize(moduleSize) | 40 m_moduleSize(moduleSize) { |
41 | |
42 { | |
43 m_crossCheckStateCount.SetSize(3); | 41 m_crossCheckStateCount.SetSize(3); |
44 } | 42 } |
45 CBC_QRAlignmentPatternFinder::~CBC_QRAlignmentPatternFinder() { | 43 CBC_QRAlignmentPatternFinder::~CBC_QRAlignmentPatternFinder() { |
46 for (int32_t i = 0; i < m_possibleCenters.GetSize(); i++) { | 44 for (int32_t i = 0; i < m_possibleCenters.GetSize(); i++) { |
47 delete (CBC_QRAlignmentPattern*)m_possibleCenters[i]; | 45 delete (CBC_QRAlignmentPattern*)m_possibleCenters[i]; |
48 } | 46 } |
49 m_possibleCenters.RemoveAll(); | 47 m_possibleCenters.RemoveAll(); |
50 } | 48 } |
51 CBC_QRAlignmentPattern* CBC_QRAlignmentPatternFinder::Find(int32_t& e) { | 49 CBC_QRAlignmentPattern* CBC_QRAlignmentPatternFinder::Find(int32_t& e) { |
52 int32_t startX = m_startX; | 50 int32_t startX = m_startX; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 if (center->AboutEquals(estimatedModuleSize, centerI, centerJ)) { | 191 if (center->AboutEquals(estimatedModuleSize, centerI, centerJ)) { |
194 return new CBC_QRAlignmentPattern(centerJ, centerI, | 192 return new CBC_QRAlignmentPattern(centerJ, centerI, |
195 estimatedModuleSize); | 193 estimatedModuleSize); |
196 } | 194 } |
197 } | 195 } |
198 m_possibleCenters.Add( | 196 m_possibleCenters.Add( |
199 new CBC_QRAlignmentPattern(centerJ, centerI, estimatedModuleSize)); | 197 new CBC_QRAlignmentPattern(centerJ, centerI, estimatedModuleSize)); |
200 } | 198 } |
201 return NULL; | 199 return NULL; |
202 } | 200 } |
OLD | NEW |