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_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_PAGECONTENTGENERATOR_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_PAGECONTENTGENERATOR_H_ |
8 #define CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_PAGECONTENTGENERATOR_H_ | 8 #define CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_PAGECONTENTGENERATOR_H_ |
9 | 9 |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
11 #include "core/include/fxcrt/fx_basic.h" | 11 #include "core/fxcrt/include/fx_basic.h" |
12 #include "core/include/fxcrt/fx_coordinates.h" | 12 #include "core/fxcrt/include/fx_coordinates.h" |
13 #include "core/include/fxcrt/fx_system.h" | 13 #include "core/fxcrt/include/fx_system.h" |
14 | 14 |
15 class CPDF_Object; | 15 class CPDF_Object; |
16 class CPDF_Page; | 16 class CPDF_Page; |
17 class CPDF_PageObject; | 17 class CPDF_PageObject; |
18 class CPDF_ImageObject; | 18 class CPDF_ImageObject; |
19 | 19 |
20 class CPDF_PageContentGenerator { | 20 class CPDF_PageContentGenerator { |
21 public: | 21 public: |
22 explicit CPDF_PageContentGenerator(CPDF_Page* pPage); | 22 explicit CPDF_PageContentGenerator(CPDF_Page* pPage); |
23 | 23 |
24 FX_BOOL InsertPageObject(CPDF_PageObject* pPageObject); | 24 FX_BOOL InsertPageObject(CPDF_PageObject* pPageObject); |
25 void GenerateContent(); | 25 void GenerateContent(); |
26 void TransformContent(CFX_Matrix& matrix); | 26 void TransformContent(CFX_Matrix& matrix); |
27 | 27 |
28 private: | 28 private: |
29 void ProcessImage(CFX_ByteTextBuf& buf, CPDF_ImageObject* pImageObj); | 29 void ProcessImage(CFX_ByteTextBuf& buf, CPDF_ImageObject* pImageObj); |
30 void ProcessForm(CFX_ByteTextBuf& buf, | 30 void ProcessForm(CFX_ByteTextBuf& buf, |
31 const uint8_t* data, | 31 const uint8_t* data, |
32 FX_DWORD size, | 32 FX_DWORD size, |
33 CFX_Matrix& matrix); | 33 CFX_Matrix& matrix); |
34 CFX_ByteString RealizeResource(CPDF_Object* pResourceObj, | 34 CFX_ByteString RealizeResource(CPDF_Object* pResourceObj, |
35 const FX_CHAR* szType); | 35 const FX_CHAR* szType); |
36 | 36 |
37 CPDF_Page* m_pPage; | 37 CPDF_Page* m_pPage; |
38 CPDF_Document* m_pDocument; | 38 CPDF_Document* m_pDocument; |
39 CFX_ArrayTemplate<CPDF_PageObject*> m_pageObjects; | 39 CFX_ArrayTemplate<CPDF_PageObject*> m_pageObjects; |
40 }; | 40 }; |
41 | 41 |
42 #endif // CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_PAGECONTENTGENERATOR_H_ | 42 #endif // CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_PAGECONTENTGENERATOR_H_ |
OLD | NEW |