summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h
blob: 5471c4e62ae8ef9d00d076ee38f9575259cfa27c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#ifndef _BC_QRALIGNMENTPATTERNFINDER_H_
#define _BC_QRALIGNMENTPATTERNFINDER_H_
class CBC_CommonBitMatrix;
class CBC_QRAlignmentPattern;
class CBC_QRAlignmentPatternFinder;
class CBC_QRAlignmentPatternFinder  : public CFX_Object
{
private:
    CBC_CommonBitMatrix *m_image;
    CFX_PtrArray m_possibleCenters;
    FX_INT32 m_startX;
    FX_INT32 m_startY;
    FX_INT32 m_width;
    FX_INT32 m_height;
    FX_FLOAT m_moduleSize;
    CFX_Int32Array m_crossCheckStateCount;
public:
    CBC_QRAlignmentPatternFinder(CBC_CommonBitMatrix *image, FX_INT32 startX, FX_INT32 startY, FX_INT32 width, FX_INT32 height, FX_FLOAT moduleSize);
    virtual ~CBC_QRAlignmentPatternFinder();
    FX_BOOL FoundPatternCross(const CFX_Int32Array &stateCount);
    FX_FLOAT CrossCheckVertical(FX_INT32 startI, FX_INT32 startJ, FX_INT32 maxCount, FX_INT32 originalStateCountTotal);
    CBC_QRAlignmentPattern* Find(FX_INT32 &e);
    CBC_QRAlignmentPattern *HandlePossibleCenter(const CFX_Int32Array &stateCount, FX_INT32 i, FX_INT32 j);
    static FX_FLOAT CenterFromEnd(const CFX_Int32Array &stateCount, FX_INT32 end);
};
#endif