| 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_INCLUDE_FPDFAPI_FPDF_PAGE_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_ |
| 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_ |
| 9 | 9 |
| 10 #include "core/include/fxge/fx_dib.h" | 10 #include "core/include/fxge/fx_dib.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 CFX_PtrList m_ObjectList; | 90 CFX_PtrList m_ObjectList; |
| 91 FX_BOOL m_bBackgroundAlphaNeeded; | 91 FX_BOOL m_bBackgroundAlphaNeeded; |
| 92 FX_BOOL m_bReleaseMembers; | 92 FX_BOOL m_bReleaseMembers; |
| 93 CPDF_ContentParser* m_pParser; | 93 CPDF_ContentParser* m_pParser; |
| 94 ParseState m_ParseState; | 94 ParseState m_ParseState; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 class CPDF_Page : public CPDF_PageObjects, public CFX_PrivateData { | 97 class CPDF_Page : public CPDF_PageObjects, public CFX_PrivateData { |
| 98 public: | 98 public: |
| 99 CPDF_Page(); | 99 CPDF_Page(); |
| 100 | |
| 101 ~CPDF_Page(); | 100 ~CPDF_Page(); |
| 102 | 101 |
| 103 void Load(CPDF_Document* pDocument, | 102 void Load(CPDF_Document* pDocument, |
| 104 CPDF_Dictionary* pPageDict, | 103 CPDF_Dictionary* pPageDict, |
| 105 FX_BOOL bPageCache = TRUE); | 104 FX_BOOL bPageCache = TRUE); |
| 106 | 105 |
| 107 void StartParse(CPDF_ParseOptions* pOptions = NULL, FX_BOOL bReParse = FALSE); | 106 void StartParse(CPDF_ParseOptions* pOptions = NULL, FX_BOOL bReParse = FALSE); |
| 108 | |
| 109 void ParseContent(CPDF_ParseOptions* pOptions = NULL, | 107 void ParseContent(CPDF_ParseOptions* pOptions = NULL, |
| 110 FX_BOOL bReParse = FALSE); | 108 FX_BOOL bReParse = FALSE); |
| 111 | 109 |
| 112 void GetDisplayMatrix(CFX_Matrix& matrix, | 110 void GetDisplayMatrix(CFX_Matrix& matrix, |
| 113 int xPos, | 111 int xPos, |
| 114 int yPos, | 112 int yPos, |
| 115 int xSize, | 113 int xSize, |
| 116 int ySize, | 114 int ySize, |
| 117 int iRotate) const; | 115 int iRotate) const; |
| 118 | 116 |
| 119 FX_FLOAT GetPageWidth() const { return m_PageWidth; } | 117 FX_FLOAT GetPageWidth() const { return m_PageWidth; } |
| 120 | |
| 121 FX_FLOAT GetPageHeight() const { return m_PageHeight; } | 118 FX_FLOAT GetPageHeight() const { return m_PageHeight; } |
| 122 | |
| 123 CFX_FloatRect GetPageBBox() const { return m_BBox; } | 119 CFX_FloatRect GetPageBBox() const { return m_BBox; } |
| 124 | |
| 125 const CFX_Matrix& GetPageMatrix() const { return m_PageMatrix; } | 120 const CFX_Matrix& GetPageMatrix() const { return m_PageMatrix; } |
| 126 | |
| 127 CPDF_Object* GetPageAttr(const CFX_ByteStringC& name) const; | 121 CPDF_Object* GetPageAttr(const CFX_ByteStringC& name) const; |
| 128 | |
| 129 CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender; } | 122 CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender; } |
| 130 | 123 |
| 131 void ClearRenderCache(); | |
| 132 | |
| 133 protected: | 124 protected: |
| 134 friend class CPDF_ContentParser; | 125 friend class CPDF_ContentParser; |
| 135 | |
| 136 FX_FLOAT m_PageWidth; | 126 FX_FLOAT m_PageWidth; |
| 137 | |
| 138 FX_FLOAT m_PageHeight; | 127 FX_FLOAT m_PageHeight; |
| 139 | |
| 140 CFX_Matrix m_PageMatrix; | 128 CFX_Matrix m_PageMatrix; |
| 141 | |
| 142 CPDF_PageRenderCache* m_pPageRender; | 129 CPDF_PageRenderCache* m_pPageRender; |
| 143 }; | 130 }; |
| 144 class CPDF_ParseOptions { | 131 class CPDF_ParseOptions { |
| 145 public: | 132 public: |
| 146 CPDF_ParseOptions(); | 133 CPDF_ParseOptions(); |
| 147 | 134 |
| 148 FX_BOOL m_bTextOnly; | 135 FX_BOOL m_bTextOnly; |
| 149 | 136 |
| 150 FX_BOOL m_bMarkedContent; | 137 FX_BOOL m_bMarkedContent; |
| 151 | 138 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 CFX_ByteString RealizeResource(CPDF_Object* pResourceObj, | 180 CFX_ByteString RealizeResource(CPDF_Object* pResourceObj, |
| 194 const FX_CHAR* szType); | 181 const FX_CHAR* szType); |
| 195 | 182 |
| 196 private: | 183 private: |
| 197 CPDF_Page* m_pPage; | 184 CPDF_Page* m_pPage; |
| 198 CPDF_Document* m_pDocument; | 185 CPDF_Document* m_pDocument; |
| 199 CFX_ArrayTemplate<CPDF_PageObject*> m_pageObjects; | 186 CFX_ArrayTemplate<CPDF_PageObject*> m_pageObjects; |
| 200 }; | 187 }; |
| 201 | 188 |
| 202 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_ | 189 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_ |
| OLD | NEW |