Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: core/include/fpdfapi/fpdf_page.h

Issue 1519693002: Merge to XFA: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: XFA-specific changes Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 FX_DWORD CountObjects() const { return m_ObjectList.GetCount(); } 57 FX_DWORD CountObjects() const { return m_ObjectList.GetCount(); }
58 58
59 int GetObjectIndex(CPDF_PageObject* pObj) const; 59 int GetObjectIndex(CPDF_PageObject* pObj) const;
60 60
61 CPDF_PageObject* GetObjectByIndex(int index) const; 61 CPDF_PageObject* GetObjectByIndex(int index) const;
62 62
63 FX_POSITION InsertObject(FX_POSITION posInsertAfter, 63 FX_POSITION InsertObject(FX_POSITION posInsertAfter,
64 CPDF_PageObject* pNewObject); 64 CPDF_PageObject* pNewObject);
65 65
66 void Transform(const CFX_AffineMatrix& matrix); 66 void Transform(const CFX_Matrix& matrix);
67 67
68 FX_BOOL BackgroundAlphaNeeded() const { return m_bBackgroundAlphaNeeded; } 68 FX_BOOL BackgroundAlphaNeeded() const { return m_bBackgroundAlphaNeeded; }
69 69
70 CFX_FloatRect CalcBoundingBox() const; 70 CFX_FloatRect CalcBoundingBox() const;
71 71
72 CPDF_Dictionary* m_pFormDict; 72 CPDF_Dictionary* m_pFormDict;
73 CPDF_Stream* m_pFormStream; 73 CPDF_Stream* m_pFormStream;
74 CPDF_Document* m_pDocument; 74 CPDF_Document* m_pDocument;
75 CPDF_Dictionary* m_pPageResources; 75 CPDF_Dictionary* m_pPageResources;
76 CPDF_Dictionary* m_pResources; 76 CPDF_Dictionary* m_pResources;
(...skipping 25 matching lines...) Expand all
102 102
103 void Load(CPDF_Document* pDocument, 103 void Load(CPDF_Document* pDocument,
104 CPDF_Dictionary* pPageDict, 104 CPDF_Dictionary* pPageDict,
105 FX_BOOL bPageCache = TRUE); 105 FX_BOOL bPageCache = TRUE);
106 106
107 void StartParse(CPDF_ParseOptions* pOptions = NULL, FX_BOOL bReParse = FALSE); 107 void StartParse(CPDF_ParseOptions* pOptions = NULL, FX_BOOL bReParse = FALSE);
108 108
109 void ParseContent(CPDF_ParseOptions* pOptions = NULL, 109 void ParseContent(CPDF_ParseOptions* pOptions = NULL,
110 FX_BOOL bReParse = FALSE); 110 FX_BOOL bReParse = FALSE);
111 111
112 void GetDisplayMatrix(CFX_AffineMatrix& matrix, 112 void GetDisplayMatrix(CFX_Matrix& matrix,
113 int xPos, 113 int xPos,
114 int yPos, 114 int yPos,
115 int xSize, 115 int xSize,
116 int ySize, 116 int ySize,
117 int iRotate) const; 117 int iRotate) const;
118 118
119 FX_FLOAT GetPageWidth() const { return m_PageWidth; } 119 FX_FLOAT GetPageWidth() const { return m_PageWidth; }
120 120
121 FX_FLOAT GetPageHeight() const { return m_PageHeight; } 121 FX_FLOAT GetPageHeight() const { return m_PageHeight; }
122 122
123 CFX_FloatRect GetPageBBox() const { return m_BBox; } 123 CFX_FloatRect GetPageBBox() const { return m_BBox; }
124 124
125 const CFX_AffineMatrix& GetPageMatrix() const { return m_PageMatrix; } 125 const CFX_Matrix& GetPageMatrix() const { return m_PageMatrix; }
126 126
127 CPDF_Object* GetPageAttr(const CFX_ByteStringC& name) const; 127 CPDF_Object* GetPageAttr(const CFX_ByteStringC& name) const;
128 128
129 CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender; } 129 CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender; }
130 130
131 void ClearRenderCache(); 131 void ClearRenderCache();
132 132
133 protected: 133 protected:
134 friend class CPDF_ContentParser; 134 friend class CPDF_ContentParser;
135 135
136 FX_FLOAT m_PageWidth; 136 FX_FLOAT m_PageWidth;
137 137
138 FX_FLOAT m_PageHeight; 138 FX_FLOAT m_PageHeight;
139 139
140 CFX_AffineMatrix m_PageMatrix; 140 CFX_Matrix m_PageMatrix;
141 141
142 CPDF_PageRenderCache* m_pPageRender; 142 CPDF_PageRenderCache* m_pPageRender;
143 }; 143 };
144 class CPDF_ParseOptions { 144 class CPDF_ParseOptions {
145 public: 145 public:
146 CPDF_ParseOptions(); 146 CPDF_ParseOptions();
147 147
148 FX_BOOL m_bTextOnly; 148 FX_BOOL m_bTextOnly;
149 149
150 FX_BOOL m_bMarkedContent; 150 FX_BOOL m_bMarkedContent;
151 151
152 FX_BOOL m_bSeparateForm; 152 FX_BOOL m_bSeparateForm;
153 153
154 FX_BOOL m_bDecodeInlineImage; 154 FX_BOOL m_bDecodeInlineImage;
155 }; 155 };
156 class CPDF_Form : public CPDF_PageObjects { 156 class CPDF_Form : public CPDF_PageObjects {
157 public: 157 public:
158 CPDF_Form(CPDF_Document* pDocument, 158 CPDF_Form(CPDF_Document* pDocument,
159 CPDF_Dictionary* pPageResources, 159 CPDF_Dictionary* pPageResources,
160 CPDF_Stream* pFormStream, 160 CPDF_Stream* pFormStream,
161 CPDF_Dictionary* pParentResources = NULL); 161 CPDF_Dictionary* pParentResources = NULL);
162 162
163 ~CPDF_Form(); 163 ~CPDF_Form();
164 164
165 void StartParse(CPDF_AllStates* pGraphicStates, 165 void StartParse(CPDF_AllStates* pGraphicStates,
166 CFX_AffineMatrix* pParentMatrix, 166 CFX_Matrix* pParentMatrix,
167 CPDF_Type3Char* pType3Char, 167 CPDF_Type3Char* pType3Char,
168 CPDF_ParseOptions* pOptions, 168 CPDF_ParseOptions* pOptions,
169 int level = 0); 169 int level = 0);
170 170
171 void ParseContent(CPDF_AllStates* pGraphicStates, 171 void ParseContent(CPDF_AllStates* pGraphicStates,
172 CFX_AffineMatrix* pParentMatrix, 172 CFX_Matrix* pParentMatrix,
173 CPDF_Type3Char* pType3Char, 173 CPDF_Type3Char* pType3Char,
174 CPDF_ParseOptions* pOptions, 174 CPDF_ParseOptions* pOptions,
175 int level = 0); 175 int level = 0);
176 176
177 CPDF_Form* Clone() const; 177 CPDF_Form* Clone() const;
178 }; 178 };
179 class CPDF_PageContentGenerate { 179 class CPDF_PageContentGenerate {
180 public: 180 public:
181 CPDF_PageContentGenerate(CPDF_Page* pPage); 181 CPDF_PageContentGenerate(CPDF_Page* pPage);
182 ~CPDF_PageContentGenerate(); 182 ~CPDF_PageContentGenerate();
(...skipping 10 matching lines...) Expand all
193 CFX_ByteString RealizeResource(CPDF_Object* pResourceObj, 193 CFX_ByteString RealizeResource(CPDF_Object* pResourceObj,
194 const FX_CHAR* szType); 194 const FX_CHAR* szType);
195 195
196 private: 196 private:
197 CPDF_Page* m_pPage; 197 CPDF_Page* m_pPage;
198 CPDF_Document* m_pDocument; 198 CPDF_Document* m_pDocument;
199 CFX_ArrayTemplate<CPDF_PageObject*> m_pageObjects; 199 CFX_ArrayTemplate<CPDF_PageObject*> m_pageObjects;
200 }; 200 };
201 201
202 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_ 202 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698