OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_FPDFDOC_CTYPESET_H_ | 7 #ifndef CORE_FPDFDOC_CTYPESET_H_ |
8 #define CORE_FPDFDOC_CTYPESET_H_ | 8 #define CORE_FPDFDOC_CTYPESET_H_ |
9 | 9 |
10 #include "core/fpdfdoc/cpvt_floatrect.h" | 10 #include "core/fpdfdoc/cpvt_floatrect.h" |
11 #include "core/fxcrt/include/fx_system.h" | 11 #include "core/fxcrt/include/fx_system.h" |
12 | 12 |
13 class CPDF_VariableText; | 13 class CPDF_VariableText; |
14 class CSection; | 14 class CSection; |
15 | 15 |
16 class CTypeset { | 16 class CTypeset { |
17 public: | 17 public: |
18 explicit CTypeset(CSection* pSection); | 18 explicit CTypeset(CSection* pSection); |
19 ~CTypeset(); | 19 virtual ~CTypeset(); |
20 | 20 CPVT_Size GetEditSize(FX_FLOAT fFontSize); |
21 CFX_PointF GetEditSize(FX_FLOAT fFontSize); | |
22 CPVT_FloatRect Typeset(); | 21 CPVT_FloatRect Typeset(); |
23 CPVT_FloatRect CharArray(); | 22 CPVT_FloatRect CharArray(); |
24 | 23 |
25 private: | 24 private: |
26 void SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize); | 25 void SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize); |
27 void OutputLines(); | 26 void OutputLines(); |
28 FX_FLOAT GetXPosForAlignment(FX_FLOAT fTypesetWidth, | |
29 FX_FLOAT fLineWidth) const; | |
30 | 27 |
31 CPVT_FloatRect m_rcRet; | 28 CPVT_FloatRect m_rcRet; |
32 CPDF_VariableText* m_pVT; | 29 CPDF_VariableText* m_pVT; |
33 CSection* const m_pSection; | 30 CSection* const m_pSection; |
34 }; | 31 }; |
35 | 32 |
36 #endif // CORE_FPDFDOC_CTYPESET_H_ | 33 #endif // CORE_FPDFDOC_CTYPESET_H_ |
OLD | NEW |