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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 stateCountTotal); | 186 stateCountTotal); |
187 if (!FXSYS_isnan(centerI)) { | 187 if (!FXSYS_isnan(centerI)) { |
188 FX_FLOAT estimatedModuleSize = | 188 FX_FLOAT estimatedModuleSize = |
189 (FX_FLOAT)(stateCount[0] + stateCount[1] + stateCount[2]) / 3.0f; | 189 (FX_FLOAT)(stateCount[0] + stateCount[1] + stateCount[2]) / 3.0f; |
190 int32_t max = m_possibleCenters.GetSize(); | 190 int32_t max = m_possibleCenters.GetSize(); |
191 for (int32_t index = 0; index < max; index++) { | 191 for (int32_t index = 0; index < max; index++) { |
192 CBC_QRAlignmentPattern* center = | 192 CBC_QRAlignmentPattern* center = |
193 (CBC_QRAlignmentPattern*)(m_possibleCenters[index]); | 193 (CBC_QRAlignmentPattern*)(m_possibleCenters[index]); |
194 if (center->AboutEquals(estimatedModuleSize, centerI, centerJ)) { | 194 if (center->AboutEquals(estimatedModuleSize, centerI, centerJ)) { |
195 return new CBC_QRAlignmentPattern(centerJ, centerI, | 195 return new CBC_QRAlignmentPattern(centerJ, centerI, |
196 estimatedModuleSize); | 196 estimatedModuleSize); |
197 } | 197 } |
198 } | 198 } |
199 m_possibleCenters.Add( | 199 m_possibleCenters.Add( |
200 new CBC_QRAlignmentPattern(centerJ, centerI, estimatedModuleSize)); | 200 new CBC_QRAlignmentPattern(centerJ, centerI, estimatedModuleSize)); |
201 } | 201 } |
202 return NULL; | 202 return NULL; |
203 } | 203 } |
OLD | NEW |