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

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

Issue 1153033009: Merge to XFA: Kill unused IPDF_ classes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/include/fpdfdoc/fpdf_tagged.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RENDER_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
9 9
10 #include "../fxge/fx_ge.h" 10 #include "../fxge/fx_ge.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 void Create(CPDF_Document* pDoc = NULL, CPDF_PageRend erCache* pPageCache = NULL, 90 void Create(CPDF_Document* pDoc = NULL, CPDF_PageRend erCache* pPageCache = NULL,
91 CPDF_Dictionary* pPageResources = NULL, FX_BOOL bFirs tLayer = TRUE); 91 CPDF_Dictionary* pPageResources = NULL, FX_BOOL bFirs tLayer = TRUE);
92 92
93 ~CPDF_RenderContext(); 93 ~CPDF_RenderContext();
94 94
95 void Clear(); 95 void Clear();
96 96
97 void AppendObjectList(CPDF_PageObjects* pObjs, const CFX_AffineMatrix* pObject2Device); 97 void AppendObjectList(CPDF_PageObjects* pObjs, const CFX_AffineMatrix* pObject2Device);
98 98
99 void SetBackground(class IPDF_BackgroundDraw* pBackgr ound);
100
101 void Render(CFX_RenderDevice* pDevice, const CPDF_Ren derOptions* pOptions = NULL, 99 void Render(CFX_RenderDevice* pDevice, const CPDF_Ren derOptions* pOptions = NULL,
102 const CFX_AffineMatrix* pFinalMatrix = NULL); 100 const CFX_AffineMatrix* pFinalMatrix = NULL);
103 101
104 void DrawObjectList(CFX_RenderDevice* pDevice, CPDF_P ageObjects* pObjs, 102 void DrawObjectList(CFX_RenderDevice* pDevice, CPDF_P ageObjects* pObjs,
105 const CFX_AffineMatrix* pObject2Device, const CPDF_RenderOptions* pOptions); 103 const CFX_AffineMatrix* pObject2Device, const CPDF_RenderOptions* pOptions);
106 104
107 void GetBackground(CFX_DIBitmap* pBuffer, const CPDF_ PageObject* pObj, 105 void GetBackground(CFX_DIBitmap* pBuffer, const CPDF_ PageObject* pObj,
108 const CPDF_RenderOptions* pOptions, CFX_Affine Matrix* pFinalMatrix); 106 const CPDF_RenderOptions* pOptions, CFX_Affine Matrix* pFinalMatrix);
109 107
110 CPDF_PageRenderCache* GetPageCache() const 108 CPDF_PageRenderCache* GetPageCache() const
111 { 109 {
112 return m_pPageCache; 110 return m_pPageCache;
113 } 111 }
114 112
115 113
116 114
117 CPDF_Document* m_pDocument; 115 CPDF_Document* m_pDocument;
118 116
119 CPDF_Dictionary* m_pPageResources; 117 CPDF_Dictionary* m_pPageResources;
120 118
121 CPDF_PageRenderCache* m_pPageCache; 119 CPDF_PageRenderCache* m_pPageCache;
122 120
123 protected: 121 protected:
124 122
125 CFX_ArrayTemplate<struct _PDF_RenderItem> m_ContentList; 123 CFX_ArrayTemplate<struct _PDF_RenderItem> m_ContentList;
126 124
127 IPDF_BackgroundDraw* m_pBackgroundDraw;
128
129 FX_BOOL m_bFirstLayer; 125 FX_BOOL m_bFirstLayer;
130 126
131 void Render(CFX_RenderDevice* pDevice, const CPDF_Pag eObject* pStopObj, 127 void Render(CFX_RenderDevice* pDevice, const CPDF_Pag eObject* pStopObj,
132 const CPDF_RenderOptions* pOptions, const CFX_AffineM atrix* pFinalMatrix); 128 const CPDF_RenderOptions* pOptions, const CFX_AffineM atrix* pFinalMatrix);
133 friend class CPDF_RenderStatus; 129 friend class CPDF_RenderStatus;
134 friend class CPDF_ProgressiveRenderer; 130 friend class CPDF_ProgressiveRenderer;
135 }; 131 };
136 class IPDF_BackgroundDraw
137 {
138 public:
139 virtual ~IPDF_BackgroundDraw() { }
140 virtual void OnDrawBackground(
141 CFX_RenderDevice* pBitmapDevice,
142 const CFX_AffineMatrix* pOriginal2Bitmap
143 ) = 0;
144 };
145 class CPDF_ProgressiveRenderer 132 class CPDF_ProgressiveRenderer
146 { 133 {
147 public: 134 public:
148 135
149 CPDF_ProgressiveRenderer(); 136 CPDF_ProgressiveRenderer();
150 137
151 ~CPDF_ProgressiveRenderer(); 138 ~CPDF_ProgressiveRenderer();
152 139
153 typedef enum { 140 typedef enum {
154 Ready, 141 Ready,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 FX_ARGB fill_argb, FX_ARGB stroke_argb, CFX_Pat hData* pClippingPath, int nFlag = 0); 214 FX_ARGB fill_argb, FX_ARGB stroke_argb, CFX_Pat hData* pClippingPath, int nFlag = 0);
228 215
229 static FX_BOOL DrawNormalText(CFX_RenderDevice* pDevice, int nChars, FX _DWORD* pCharCodes, FX_FLOAT* pCharPos, 216 static FX_BOOL DrawNormalText(CFX_RenderDevice* pDevice, int nChars, FX _DWORD* pCharCodes, FX_FLOAT* pCharPos,
230 CPDF_Font* pFont, FX_FLOAT font_size, const C FX_AffineMatrix* pText2Device, 217 CPDF_Font* pFont, FX_FLOAT font_size, const C FX_AffineMatrix* pText2Device,
231 FX_ARGB fill_argb, const CPDF_RenderOptions* pOptions); 218 FX_ARGB fill_argb, const CPDF_RenderOptions* pOptions);
232 219
233 static FX_BOOL DrawType3Text(CFX_RenderDevice* pDevice, int nChars, FX_ DWORD* pCharCodes, FX_FLOAT* pCharPos, 220 static FX_BOOL DrawType3Text(CFX_RenderDevice* pDevice, int nChars, FX_ DWORD* pCharCodes, FX_FLOAT* pCharPos,
234 CPDF_Font* pFont, FX_FLOAT font_size, const CF X_AffineMatrix* pText2Device, 221 CPDF_Font* pFont, FX_FLOAT font_size, const CF X_AffineMatrix* pText2Device,
235 FX_ARGB fill_argb); 222 FX_ARGB fill_argb);
236 }; 223 };
237 class IPDF_PageImageCache
238 {
239 public:
240
241 static IPDF_PageImageCache* Create();
242
243 virtual ~IPDF_PageImageCache() {}
244
245 virtual void OutputPage(CFX_RenderDevice* pDevice, CPDF_Page* pPage,
246 int pos_x, int pos_y, int size_x, int size_y, int rotate) = 0;
247
248 virtual void SetCacheLimit(FX_DWORD limit) = 0;
249 };
250 class CPDF_PageRenderCache 224 class CPDF_PageRenderCache
251 { 225 {
252 public: 226 public:
253 CPDF_PageRenderCache(CPDF_Page* pPage) 227 CPDF_PageRenderCache(CPDF_Page* pPage)
254 { 228 {
255 m_pPage = pPage; 229 m_pPage = pPage;
256 m_nTimeCount = 0; 230 m_nTimeCount = 0;
257 m_nCacheSize = 0; 231 m_nCacheSize = 0;
258 m_pCurImageCache = NULL; 232 m_pCurImageCache = NULL;
259 m_bCurFindCache = FALSE; 233 m_bCurFindCache = FALSE;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 class CPDF_RenderConfig 282 class CPDF_RenderConfig
309 { 283 {
310 public: 284 public:
311 CPDF_RenderConfig(); 285 CPDF_RenderConfig();
312 ~CPDF_RenderConfig(); 286 ~CPDF_RenderConfig();
313 int m_HalftoneLimit; 287 int m_HalftoneLimit;
314 int m_RenderStepLimit; 288 int m_RenderStepLimit;
315 }; 289 };
316 290
317 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_ 291 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/include/fpdfdoc/fpdf_tagged.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698