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 CORE_SRC_FPDFDOC_PDF_VT_H_ | 7 #ifndef CORE_FPDFDOC_PDF_VT_H_ |
8 #define CORE_SRC_FPDFDOC_PDF_VT_H_ | 8 #define CORE_FPDFDOC_PDF_VT_H_ |
9 | 9 |
10 class CPVT_Size; | 10 #include "core/include/fpdfdoc/fpdf_vt.h" |
11 class CPVT_FloatRect; | 11 |
12 struct CPVT_SectionInfo; | |
13 struct CPVT_LineInfo; | |
14 struct CPVT_WordInfo; | |
15 class CLine; | |
16 class CLines; | |
17 class CSection; | |
18 class CTypeset; | |
19 class CPDF_EditContainer; | |
20 class CPDF_VariableText; | 12 class CPDF_VariableText; |
21 class CPDF_VariableText_Iterator; | 13 class CPDF_VariableText_Iterator; |
| 14 |
22 #define IsFloatZero(f) ((f) < 0.0001 && (f) > -0.0001) | 15 #define IsFloatZero(f) ((f) < 0.0001 && (f) > -0.0001) |
23 #define IsFloatBigger(fa, fb) ((fa) > (fb) && !IsFloatZero((fa) - (fb))) | 16 #define IsFloatBigger(fa, fb) ((fa) > (fb) && !IsFloatZero((fa) - (fb))) |
24 #define IsFloatSmaller(fa, fb) ((fa) < (fb) && !IsFloatZero((fa) - (fb))) | 17 #define IsFloatSmaller(fa, fb) ((fa) < (fb) && !IsFloatZero((fa) - (fb))) |
25 | 18 |
26 class CPVT_Size { | 19 class CPVT_Size { |
27 public: | 20 public: |
28 CPVT_Size() : x(0.0f), y(0.0f) {} | 21 CPVT_Size() : x(0.0f), y(0.0f) {} |
29 CPVT_Size(FX_FLOAT other_x, FX_FLOAT other_y) { | 22 CPVT_Size(FX_FLOAT other_x, FX_FLOAT other_y) { |
30 x = other_x; | 23 x = other_x; |
31 y = other_y; | 24 y = other_y; |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 FX_BOOL SetSection(const CPVT_Section& section) override; | 544 FX_BOOL SetSection(const CPVT_Section& section) override; |
552 void SetAt(int32_t nWordIndex) override; | 545 void SetAt(int32_t nWordIndex) override; |
553 void SetAt(const CPVT_WordPlace& place) override; | 546 void SetAt(const CPVT_WordPlace& place) override; |
554 const CPVT_WordPlace& GetAt() const override { return m_CurPos; } | 547 const CPVT_WordPlace& GetAt() const override { return m_CurPos; } |
555 | 548 |
556 private: | 549 private: |
557 CPVT_WordPlace m_CurPos; | 550 CPVT_WordPlace m_CurPos; |
558 CPDF_VariableText* m_pVT; | 551 CPDF_VariableText* m_pVT; |
559 }; | 552 }; |
560 | 553 |
561 #endif // CORE_SRC_FPDFDOC_PDF_VT_H_ | 554 #endif // CORE_FPDFDOC_PDF_VT_H_ |
OLD | NEW |