Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxbarcode / src / include / 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 class CBC_BoundingBox : public CFX_Object\r
13 {\r
14 public:\r
15     CBC_BoundingBox(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_ResultPoint* bottomLeft, CBC_ResultPoint* topRight, CBC_ResultPoint* bottomRight, FX_INT32 &e);\r
16     CBC_BoundingBox(CBC_BoundingBox* boundingBox);\r
17     virtual ~CBC_BoundingBox();\r
18     static CBC_BoundingBox* merge(CBC_BoundingBox* leftBox, CBC_BoundingBox* rightBox, FX_INT32 &e);\r
19     CBC_BoundingBox* addMissingRows(FX_INT32 missingStartRows, FX_INT32 missingEndRows, FX_BOOL isLeft, FX_INT32 &e);\r
20     void setTopRight(CBC_ResultPoint topRight);\r
21     void setBottomRight(CBC_ResultPoint bottomRight);\r
22     FX_INT32 getMinX();\r
23     FX_INT32 getMaxX();\r
24     FX_INT32 getMinY();\r
25     FX_INT32 getMaxY();\r
26     CBC_ResultPoint* getTopLeft();\r
27     CBC_ResultPoint* getTopRight();\r
28     CBC_ResultPoint* getBottomLeft();\r
29     CBC_ResultPoint* getBottomRight();\r
30 private:\r
31     CBC_CommonBitMatrix* m_image;\r
32     CBC_ResultPoint* m_topLeft;\r
33     CBC_ResultPoint* m_bottomLeft;\r
34     CBC_ResultPoint* m_topRight;\r
35     CBC_ResultPoint* m_bottomRight;\r
36     FX_INT32 m_minX;\r
37     FX_INT32 m_maxX;\r
38     FX_INT32 m_minY;\r
39     FX_INT32 m_maxY;\r
40     void init(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_ResultPoint* bottomLeft, CBC_ResultPoint* topRight, CBC_ResultPoint* bottomRight);\r
41     void calculateMinMaxValues();\r
42 };\r
43 #endif\r