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 _FPDF_PAGE_ | 7 #ifndef _FPDF_PAGE_ |
8 #define _FPDF_PAGE_ | 8 #define _FPDF_PAGE_ |
9 #ifndef _FPDF_PARSER_ | 9 #ifndef _FPDF_PARSER_ |
10 #include "fpdf_parser.h" | 10 #include "fpdf_parser.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class CPDF_AllStates; | 25 class CPDF_AllStates; |
26 class CPDF_ContentParser; | 26 class CPDF_ContentParser; |
27 class CPDF_StreamContentParser; | 27 class CPDF_StreamContentParser; |
28 class CPDF_ResourceNaming; | 28 class CPDF_ResourceNaming; |
29 #define PDFTRANS_GROUP 0x0100 | 29 #define PDFTRANS_GROUP 0x0100 |
30 #define PDFTRANS_ISOLATED 0x0200 | 30 #define PDFTRANS_ISOLATED 0x0200 |
31 #define PDFTRANS_KNOCKOUT 0x0400 | 31 #define PDFTRANS_KNOCKOUT 0x0400 |
32 #define PDF_CONTENT_NOT_PARSED 0 | 32 #define PDF_CONTENT_NOT_PARSED 0 |
33 #define PDF_CONTENT_PARSING 1 | 33 #define PDF_CONTENT_PARSING 1 |
34 #define PDF_CONTENT_PARSED 2 | 34 #define PDF_CONTENT_PARSED 2 |
35 class CPDF_PageObjects : public CFX_Object | 35 class CPDF_PageObjects |
36 { | 36 { |
37 public: | 37 public: |
38 | 38 |
39 CPDF_PageObjects(FX_BOOL bReleaseMembers = TRUE); | 39 CPDF_PageObjects(FX_BOOL bReleaseMembers = TRUE); |
40 | 40 |
41 ~CPDF_PageObjects(); | 41 ~CPDF_PageObjects(); |
42 | 42 |
43 | 43 |
44 | 44 |
45 | 45 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 friend class CPDF_ContentParser; | 192 friend class CPDF_ContentParser; |
193 | 193 |
194 FX_FLOAT m_PageWidth; | 194 FX_FLOAT m_PageWidth; |
195 | 195 |
196 FX_FLOAT m_PageHeight; | 196 FX_FLOAT m_PageHeight; |
197 | 197 |
198 CFX_AffineMatrix m_PageMatrix; | 198 CFX_AffineMatrix m_PageMatrix; |
199 | 199 |
200 CPDF_PageRenderCache* m_pPageRender; | 200 CPDF_PageRenderCache* m_pPageRender; |
201 }; | 201 }; |
202 class CPDF_ParseOptions : public CFX_Object | 202 class CPDF_ParseOptions |
203 { | 203 { |
204 public: | 204 public: |
205 | 205 |
206 CPDF_ParseOptions(); | 206 CPDF_ParseOptions(); |
207 | 207 |
208 FX_BOOL m_bTextOnly; | 208 FX_BOOL m_bTextOnly; |
209 | 209 |
210 FX_BOOL m_bMarkedContent; | 210 FX_BOOL m_bMarkedContent; |
211 | 211 |
212 FX_BOOL m_bSeparateForm; | 212 FX_BOOL m_bSeparateForm; |
213 | 213 |
214 FX_BOOL m_bDecodeInlineImage; | 214 FX_BOOL m_bDecodeInlineImage; |
215 }; | 215 }; |
216 class CPDF_Form : public CPDF_PageObjects | 216 class CPDF_Form : public CPDF_PageObjects |
217 { | 217 { |
218 public: | 218 public: |
219 | 219 |
220 CPDF_Form(CPDF_Document* pDocument, CPDF_Dictionary* pPageResources, CPDF_St
ream* pFormStream, CPDF_Dictionary* pParentResources = NULL); | 220 CPDF_Form(CPDF_Document* pDocument, CPDF_Dictionary* pPageResources, CPDF_St
ream* pFormStream, CPDF_Dictionary* pParentResources = NULL); |
221 | 221 |
222 ~CPDF_Form(); | 222 ~CPDF_Form(); |
223 | 223 |
224 void StartParse(CPDF_AllStates* pGraphicState
s, CFX_AffineMatrix* pParentMatrix, | 224 void StartParse(CPDF_AllStates* pGraphicState
s, CFX_AffineMatrix* pParentMatrix, |
225 CPDF_Type3Char* pType3Char, CPDF_ParseOptions
* pOptions, int level = 0); | 225 CPDF_Type3Char* pType3Char, CPDF_ParseOptions
* pOptions, int level = 0); |
226 | 226 |
227 void ParseContent(CPDF_AllStates* pGraphicSta
tes, CFX_AffineMatrix* pParentMatrix, | 227 void ParseContent(CPDF_AllStates* pGraphicSta
tes, CFX_AffineMatrix* pParentMatrix, |
228 CPDF_Type3Char* pType3Char, CPDF_ParseOptio
ns* pOptions, int level = 0); | 228 CPDF_Type3Char* pType3Char, CPDF_ParseOptio
ns* pOptions, int level = 0); |
229 | 229 |
230 CPDF_Form* Clone() const; | 230 CPDF_Form* Clone() const; |
231 }; | 231 }; |
232 class CPDF_PageContentGenerate : public CFX_Object | 232 class CPDF_PageContentGenerate |
233 { | 233 { |
234 public: | 234 public: |
235 CPDF_PageContentGenerate(CPDF_Page* pPage); | 235 CPDF_PageContentGenerate(CPDF_Page* pPage); |
236 ~CPDF_PageContentGenerate(); | 236 ~CPDF_PageContentGenerate(); |
237 FX_BOOL InsertPageObject(CPDF_PageObject* pPageObject); | 237 FX_BOOL InsertPageObject(CPDF_PageObject* pPageObject); |
238 void GenerateContent(); | 238 void GenerateContent(); |
239 void TransformContent(CFX_Matrix& matrix); | 239 void TransformContent(CFX_Matrix& matrix); |
240 protected: | 240 protected: |
241 void ProcessImage(CFX_ByteTextBuf& buf, CPDF_ImageObject* pImageO
bj); | 241 void ProcessImage(CFX_ByteTextBuf& buf, CPDF_ImageObject* pImageO
bj); |
242 void ProcessForm(CFX_ByteTextBuf& buf, FX_LPCBYTE data, FX_DWORD
size, CFX_Matrix& matrix); | 242 void ProcessForm(CFX_ByteTextBuf& buf, FX_LPCBYTE data, FX_DWORD
size, CFX_Matrix& matrix); |
243 CFX_ByteString RealizeResource(CPDF_Object* pResourceObj, const FX_CHAR* sz
Type); | 243 CFX_ByteString RealizeResource(CPDF_Object* pResourceObj, const FX_CHAR* sz
Type); |
244 private: | 244 private: |
245 CPDF_Page* m_pPage; | 245 CPDF_Page* m_pPage; |
246 CPDF_Document* m_pDocument; | 246 CPDF_Document* m_pDocument; |
247 CFX_PtrArray m_pageObjects; | 247 CFX_PtrArray m_pageObjects; |
248 }; | 248 }; |
249 #endif | 249 #endif |
OLD | NEW |