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 | 6 |
7 #ifndef _BC_BOUNDINGBOX_H_ | 7 #ifndef _BC_BOUNDINGBOX_H_ |
8 #define _BC_BOUNDINGBOX_H_ | 8 #define _BC_BOUNDINGBOX_H_ |
9 class CBC_CommonBitMatrix; | 9 class CBC_CommonBitMatrix; |
10 class CBC_ResultPoint; | 10 class CBC_ResultPoint; |
11 class CBC_BoundingBox | 11 class CBC_BoundingBox |
12 { | 12 { |
13 public: | 13 public: |
14 CBC_BoundingBox(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_Re
sultPoint* bottomLeft, CBC_ResultPoint* topRight, CBC_ResultPoint* bottomRight,
FX_INT32 &e); | 14 CBC_BoundingBox(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_Re
sultPoint* bottomLeft, CBC_ResultPoint* topRight, CBC_ResultPoint* bottomRight,
int32_t &e); |
15 CBC_BoundingBox(CBC_BoundingBox* boundingBox); | 15 CBC_BoundingBox(CBC_BoundingBox* boundingBox); |
16 virtual ~CBC_BoundingBox(); | 16 virtual ~CBC_BoundingBox(); |
17 static CBC_BoundingBox* merge(CBC_BoundingBox* leftBox, CBC_BoundingBox* rig
htBox, FX_INT32 &e); | 17 static CBC_BoundingBox* merge(CBC_BoundingBox* leftBox, CBC_BoundingBox* rig
htBox, int32_t &e); |
18 CBC_BoundingBox* addMissingRows(FX_INT32 missingStartRows, FX_INT32 missingE
ndRows, FX_BOOL isLeft, FX_INT32 &e); | 18 CBC_BoundingBox* addMissingRows(int32_t missingStartRows, int32_t missingEnd
Rows, FX_BOOL isLeft, int32_t &e); |
19 void setTopRight(CBC_ResultPoint topRight); | 19 void setTopRight(CBC_ResultPoint topRight); |
20 void setBottomRight(CBC_ResultPoint bottomRight); | 20 void setBottomRight(CBC_ResultPoint bottomRight); |
21 FX_INT32 getMinX(); | 21 int32_t getMinX(); |
22 FX_INT32 getMaxX(); | 22 int32_t getMaxX(); |
23 FX_INT32 getMinY(); | 23 int32_t getMinY(); |
24 FX_INT32 getMaxY(); | 24 int32_t getMaxY(); |
25 CBC_ResultPoint* getTopLeft(); | 25 CBC_ResultPoint* getTopLeft(); |
26 CBC_ResultPoint* getTopRight(); | 26 CBC_ResultPoint* getTopRight(); |
27 CBC_ResultPoint* getBottomLeft(); | 27 CBC_ResultPoint* getBottomLeft(); |
28 CBC_ResultPoint* getBottomRight(); | 28 CBC_ResultPoint* getBottomRight(); |
29 private: | 29 private: |
30 CBC_CommonBitMatrix* m_image; | 30 CBC_CommonBitMatrix* m_image; |
31 CBC_ResultPoint* m_topLeft; | 31 CBC_ResultPoint* m_topLeft; |
32 CBC_ResultPoint* m_bottomLeft; | 32 CBC_ResultPoint* m_bottomLeft; |
33 CBC_ResultPoint* m_topRight; | 33 CBC_ResultPoint* m_topRight; |
34 CBC_ResultPoint* m_bottomRight; | 34 CBC_ResultPoint* m_bottomRight; |
35 FX_INT32 m_minX; | 35 int32_t m_minX; |
36 FX_INT32 m_maxX; | 36 int32_t m_maxX; |
37 FX_INT32 m_minY; | 37 int32_t m_minY; |
38 FX_INT32 m_maxY; | 38 int32_t m_maxY; |
39 void init(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_ResultPo
int* bottomLeft, CBC_ResultPoint* topRight, CBC_ResultPoint* bottomRight); | 39 void init(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_ResultPo
int* bottomLeft, CBC_ResultPoint* topRight, CBC_ResultPoint* bottomRight); |
40 void calculateMinMaxValues(); | 40 void calculateMinMaxValues(); |
41 }; | 41 }; |
42 #endif | 42 #endif |
OLD | NEW |