• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FPDFDOC_CTYPESET_H_
8 #define CORE_FPDFDOC_CTYPESET_H_
9 
10 #include "core/fpdfdoc/cpvt_floatrect.h"
11 #include "core/fxcrt/fx_system.h"
12 #include "core/fxcrt/unowned_ptr.h"
13 
14 class CPDF_VariableText;
15 class CSection;
16 
17 class CTypeset final {
18  public:
19   explicit CTypeset(CSection* pSection);
20   ~CTypeset();
21 
22   CFX_SizeF GetEditSize(float fFontSize);
23   CPVT_FloatRect Typeset();
24   CPVT_FloatRect CharArray();
25 
26  private:
27   void SplitLines(bool bTypeset, float fFontSize);
28   void OutputLines();
29 
30   CPVT_FloatRect m_rcRet;
31   UnownedPtr<CPDF_VariableText> const m_pVT;
32   CSection* const m_pSection;
33 };
34 
35 #endif  // CORE_FPDFDOC_CTYPESET_H_
36