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_FPDFAPI_FPDF_PAGE_PAGEINT_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ |
8 #define CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ | 8 #define CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <unordered_map> | 12 #include <unordered_map> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
| 15 #include "core/fpdfapi/fpdf_page/cpdf_contentmark.h" |
15 #include "core/fpdfapi/fpdf_page/cpdf_parseoptions.h" | 16 #include "core/fpdfapi/fpdf_page/cpdf_parseoptions.h" |
16 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h" | 17 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h" |
17 #include "core/include/fpdfapi/fpdf_pageobj.h" | 18 #include "core/include/fpdfapi/fpdf_resource.h" |
| 19 #include "core/include/fxge/fx_ge.h" |
18 | 20 |
19 class CPDF_AllStates; | 21 class CPDF_AllStates; |
| 22 class CPDF_ColorSpace; |
| 23 class CPDF_Font; |
| 24 class CPDF_FontEncoding; |
| 25 class CPDF_Form; |
| 26 class CPDF_IccProfile; |
| 27 class CPDF_Image; |
| 28 class CPDF_ImageObject; |
20 class CPDF_ParseOptions; | 29 class CPDF_ParseOptions; |
21 class CPDF_IccProfile; | 30 class CPDF_Pattern; |
| 31 class CPDF_StreamAcc; |
| 32 class CPDF_TextObject; |
| 33 class CPDF_Type3Char; |
22 | 34 |
23 #define PARSE_STEP_LIMIT 100 | 35 #define PARSE_STEP_LIMIT 100 |
24 | 36 |
25 class CPDF_StreamParser { | 37 class CPDF_StreamParser { |
26 public: | 38 public: |
27 enum SyntaxType { EndOfData, Number, Keyword, Name, Others }; | 39 enum SyntaxType { EndOfData, Number, Keyword, Name, Others }; |
28 | 40 |
29 CPDF_StreamParser(const uint8_t* pData, FX_DWORD dwSize); | 41 CPDF_StreamParser(const uint8_t* pData, FX_DWORD dwSize); |
30 ~CPDF_StreamParser(); | 42 ~CPDF_StreamParser(); |
31 | 43 |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 CPDF_ParseOptions m_Options; | 313 CPDF_ParseOptions m_Options; |
302 CPDF_Type3Char* m_pType3Char; | 314 CPDF_Type3Char* m_pType3Char; |
303 FX_DWORD m_nStreams; | 315 FX_DWORD m_nStreams; |
304 std::unique_ptr<CPDF_StreamAcc> m_pSingleStream; | 316 std::unique_ptr<CPDF_StreamAcc> m_pSingleStream; |
305 std::vector<std::unique_ptr<CPDF_StreamAcc>> m_StreamArray; | 317 std::vector<std::unique_ptr<CPDF_StreamAcc>> m_StreamArray; |
306 uint8_t* m_pData; | 318 uint8_t* m_pData; |
307 FX_DWORD m_Size; | 319 FX_DWORD m_Size; |
308 FX_DWORD m_CurrentOffset; | 320 FX_DWORD m_CurrentOffset; |
309 std::unique_ptr<CPDF_StreamContentParser> m_pParser; | 321 std::unique_ptr<CPDF_StreamContentParser> m_pParser; |
310 }; | 322 }; |
311 class CPDF_AllStates : public CPDF_GraphicStates { | |
312 public: | |
313 CPDF_AllStates(); | |
314 ~CPDF_AllStates(); | |
315 void Copy(const CPDF_AllStates& src); | |
316 void ProcessExtGS(CPDF_Dictionary* pGS, CPDF_StreamContentParser* pParser); | |
317 void SetLineDash(CPDF_Array*, FX_FLOAT, FX_FLOAT scale); | |
318 CFX_Matrix m_TextMatrix, m_CTM, m_ParentMatrix; | |
319 FX_FLOAT m_TextX, m_TextY, m_TextLineX, m_TextLineY; | |
320 FX_FLOAT m_TextLeading, m_TextRise, m_TextHorzScale; | |
321 }; | |
322 | 323 |
323 class CPDF_DocPageData { | 324 class CPDF_DocPageData { |
324 public: | 325 public: |
325 explicit CPDF_DocPageData(CPDF_Document* pPDFDoc); | 326 explicit CPDF_DocPageData(CPDF_Document* pPDFDoc); |
326 ~CPDF_DocPageData(); | 327 ~CPDF_DocPageData(); |
327 | 328 |
328 void Clear(FX_BOOL bRelease = FALSE); | 329 void Clear(FX_BOOL bRelease = FALSE); |
329 CPDF_Font* GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnly); | 330 CPDF_Font* GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnly); |
330 CPDF_Font* GetStandardFont(const CFX_ByteStringC& fontName, | 331 CPDF_Font* GetStandardFont(const CFX_ByteStringC& fontName, |
331 CPDF_FontEncoding* pEncoding); | 332 CPDF_FontEncoding* pEncoding); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 | 452 |
452 private: | 453 private: |
453 CPDF_ColorSpace* m_pBaseCS; | 454 CPDF_ColorSpace* m_pBaseCS; |
454 CPDF_CountedColorSpace* m_pCountedBaseCS; | 455 CPDF_CountedColorSpace* m_pCountedBaseCS; |
455 }; | 456 }; |
456 | 457 |
457 void PDF_ReplaceAbbr(CPDF_Object* pObj); | 458 void PDF_ReplaceAbbr(CPDF_Object* pObj); |
458 bool IsPathOperator(const uint8_t* buf, size_t len); | 459 bool IsPathOperator(const uint8_t* buf, size_t len); |
459 | 460 |
460 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ | 461 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ |
OLD | NEW |