Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / src / fxbarcode / pdf417 / BC_PDF417BoundingBox.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _BC_BOUNDINGBOX_H_\r
8 #define _BC_BOUNDINGBOX_H_\r
9 class CBC_CommonBitMatrix;\r
10 class CBC_ResultPoint;\r
11 class CBC_BoundingBox\r
12 {\r
13 public:\r
14     CBC_BoundingBox(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_ResultPoint* bottomLeft, CBC_ResultPoint* topRight, CBC_ResultPoint* bottomRight, int32_t &e);\r
15     CBC_BoundingBox(CBC_BoundingBox* boundingBox);\r
16     virtual ~CBC_BoundingBox();\r
17     static CBC_BoundingBox* merge(CBC_BoundingBox* leftBox, CBC_BoundingBox* rightBox, int32_t &e);\r
18     CBC_BoundingBox* addMissingRows(int32_t missingStartRows, int32_t missingEndRows, FX_BOOL isLeft, int32_t &e);\r
19     void setTopRight(CBC_ResultPoint topRight);\r
20     void setBottomRight(CBC_ResultPoint bottomRight);\r
21     int32_t getMinX();\r
22     int32_t getMaxX();\r
23     int32_t getMinY();\r
24     int32_t getMaxY();\r
25     CBC_ResultPoint* getTopLeft();\r
26     CBC_ResultPoint* getTopRight();\r
27     CBC_ResultPoint* getBottomLeft();\r
28     CBC_ResultPoint* getBottomRight();\r
29 private:\r
30     CBC_CommonBitMatrix* m_image;\r
31     CBC_ResultPoint* m_topLeft;\r
32     CBC_ResultPoint* m_bottomLeft;\r
33     CBC_ResultPoint* m_topRight;\r
34     CBC_ResultPoint* m_bottomRight;\r
35     int32_t m_minX;\r
36     int32_t m_maxX;\r
37     int32_t m_minY;\r
38     int32_t m_maxY;\r
39     void init(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_ResultPoint* bottomLeft, CBC_ResultPoint* topRight, CBC_ResultPoint* bottomRight);\r
40     void calculateMinMaxValues();\r
41 };\r
42 #endif\r