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

Side by Side Diff: core/src/fpdfapi/fpdf_render/render_int.h

Issue 1709393002: Remove PageObject's m_Type and add As<Type> functions (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 10 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/src/fpdfapi/fpdf_render/fpdf_render_text.cpp ('k') | core/src/fpdftext/fpdf_text_int.cpp » ('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_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 7 #ifndef CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
8 #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 8 #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*>; 87 std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*>;
88 88
89 CPDF_Document* m_pPDFDoc; 89 CPDF_Document* m_pPDFDoc;
90 CFX_FontCache* m_pFontCache; 90 CFX_FontCache* m_pFontCache;
91 CPDF_Type3CacheMap m_Type3FaceMap; 91 CPDF_Type3CacheMap m_Type3FaceMap;
92 CPDF_TransferFuncMap m_TransferFuncMap; 92 CPDF_TransferFuncMap m_TransferFuncMap;
93 }; 93 };
94 94
95 class IPDF_ObjectRenderer { 95 class IPDF_ObjectRenderer {
96 public: 96 public:
97 static IPDF_ObjectRenderer* Create(int type); 97 static IPDF_ObjectRenderer* Create();
98 virtual ~IPDF_ObjectRenderer() {} 98 virtual ~IPDF_ObjectRenderer() {}
99 virtual FX_BOOL Start(CPDF_RenderStatus* pRenderStatus, 99 virtual FX_BOOL Start(CPDF_RenderStatus* pRenderStatus,
100 const CPDF_PageObject* pObj, 100 const CPDF_PageObject* pObj,
101 const CFX_Matrix* pObj2Device, 101 const CFX_Matrix* pObj2Device,
102 FX_BOOL bStdCS, 102 FX_BOOL bStdCS,
103 int blendType = FXDIB_BLEND_NORMAL) = 0; 103 int blendType = FXDIB_BLEND_NORMAL) = 0;
104 virtual FX_BOOL Continue(IFX_Pause* pPause) = 0; 104 virtual FX_BOOL Continue(IFX_Pause* pPause) = 0;
105 FX_BOOL m_Result; 105 FX_BOOL m_Result;
106 }; 106 };
107 107
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 void ProcessClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device); 144 void ProcessClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device);
145 void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device); 145 void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device);
146 FX_BOOL ProcessTransparency(const CPDF_PageObject* PageObj, 146 FX_BOOL ProcessTransparency(const CPDF_PageObject* PageObj,
147 const CFX_Matrix* pObj2Device); 147 const CFX_Matrix* pObj2Device);
148 void ProcessObjectNoClip(const CPDF_PageObject* PageObj, 148 void ProcessObjectNoClip(const CPDF_PageObject* PageObj,
149 const CFX_Matrix* pObj2Device); 149 const CFX_Matrix* pObj2Device);
150 void DrawObjWithBackground(const CPDF_PageObject* pObj, 150 void DrawObjWithBackground(const CPDF_PageObject* pObj,
151 const CFX_Matrix* pObj2Device); 151 const CFX_Matrix* pObj2Device);
152 FX_BOOL DrawObjWithBlend(const CPDF_PageObject* pObj, 152 FX_BOOL DrawObjWithBlend(const CPDF_PageObject* pObj,
153 const CFX_Matrix* pObj2Device); 153 const CFX_Matrix* pObj2Device);
154 FX_BOOL ProcessPath(CPDF_PathObject* pPathObj, const CFX_Matrix* pObj2Device); 154 FX_BOOL ProcessPath(const CPDF_PathObject* pPathObj,
155 void ProcessPathPattern(CPDF_PathObject* pPathObj, 155 const CFX_Matrix* pObj2Device);
156 void ProcessPathPattern(const CPDF_PathObject* pPathObj,
156 const CFX_Matrix* pObj2Device, 157 const CFX_Matrix* pObj2Device,
157 int& filltype, 158 int& filltype,
158 FX_BOOL& bStroke); 159 FX_BOOL& bStroke);
159 void DrawPathWithPattern(CPDF_PathObject* pPathObj, 160 void DrawPathWithPattern(const CPDF_PathObject* pPathObj,
160 const CFX_Matrix* pObj2Device, 161 const CFX_Matrix* pObj2Device,
161 CPDF_Color* pColor, 162 CPDF_Color* pColor,
162 FX_BOOL bStroke); 163 FX_BOOL bStroke);
163 void DrawTilingPattern(CPDF_TilingPattern* pPattern, 164 void DrawTilingPattern(CPDF_TilingPattern* pPattern,
164 CPDF_PageObject* pPageObj, 165 const CPDF_PageObject* pPageObj,
165 const CFX_Matrix* pObj2Device, 166 const CFX_Matrix* pObj2Device,
166 FX_BOOL bStroke); 167 FX_BOOL bStroke);
167 void DrawShadingPattern(CPDF_ShadingPattern* pPattern, 168 void DrawShadingPattern(CPDF_ShadingPattern* pPattern,
168 CPDF_PageObject* pPageObj, 169 const CPDF_PageObject* pPageObj,
169 const CFX_Matrix* pObj2Device, 170 const CFX_Matrix* pObj2Device,
170 FX_BOOL bStroke); 171 FX_BOOL bStroke);
171 FX_BOOL SelectClipPath(CPDF_PathObject* pPathObj, 172 FX_BOOL SelectClipPath(const CPDF_PathObject* pPathObj,
172 const CFX_Matrix* pObj2Device, 173 const CFX_Matrix* pObj2Device,
173 FX_BOOL bStroke); 174 FX_BOOL bStroke);
174 FX_BOOL ProcessImage(CPDF_ImageObject* pImageObj, 175 FX_BOOL ProcessImage(const CPDF_ImageObject* pImageObj,
175 const CFX_Matrix* pObj2Device); 176 const CFX_Matrix* pObj2Device);
176 FX_BOOL OutputBitmapAlpha(CPDF_ImageObject* pImageObj, 177 FX_BOOL OutputBitmapAlpha(CPDF_ImageObject* pImageObj,
177 const CFX_Matrix* pImage2Device); 178 const CFX_Matrix* pImage2Device);
178 FX_BOOL OutputImage(CPDF_ImageObject* pImageObj, 179 FX_BOOL OutputImage(CPDF_ImageObject* pImageObj,
179 const CFX_Matrix* pImage2Device); 180 const CFX_Matrix* pImage2Device);
180 FX_BOOL OutputDIBSource(const CFX_DIBSource* pOutputBitmap, 181 FX_BOOL OutputDIBSource(const CFX_DIBSource* pOutputBitmap,
181 FX_ARGB fill_argb, 182 FX_ARGB fill_argb,
182 int bitmap_alpha, 183 int bitmap_alpha,
183 const CFX_Matrix* pImage2Device, 184 const CFX_Matrix* pImage2Device,
184 CPDF_ImageCacheEntry* pImageCache, 185 CPDF_ImageCacheEntry* pImageCache,
185 FX_DWORD flags); 186 FX_DWORD flags);
186 void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, 187 void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
187 int left, 188 int left,
188 int top, 189 int top,
189 FX_ARGB mask_argb, 190 FX_ARGB mask_argb,
190 int bitmap_alpha, 191 int bitmap_alpha,
191 int blend_mode, 192 int blend_mode,
192 int bIsolated); 193 int bIsolated);
193 FX_BOOL ProcessShading(CPDF_ShadingObject* pShadingObj, 194 FX_BOOL ProcessShading(const CPDF_ShadingObject* pShadingObj,
194 const CFX_Matrix* pObj2Device); 195 const CFX_Matrix* pObj2Device);
195 void DrawShading(CPDF_ShadingPattern* pPattern, 196 void DrawShading(CPDF_ShadingPattern* pPattern,
196 CFX_Matrix* pMatrix, 197 CFX_Matrix* pMatrix,
197 FX_RECT& clip_rect, 198 FX_RECT& clip_rect,
198 int alpha, 199 int alpha,
199 FX_BOOL bAlphaMode); 200 FX_BOOL bAlphaMode);
200 FX_BOOL ProcessType3Text(const CPDF_TextObject* textobj, 201 FX_BOOL ProcessType3Text(const CPDF_TextObject* textobj,
201 const CFX_Matrix* pObj2Device); 202 const CFX_Matrix* pObj2Device);
202 FX_BOOL ProcessText(const CPDF_TextObject* textobj, 203 FX_BOOL ProcessText(const CPDF_TextObject* textobj,
203 const CFX_Matrix* pObj2Device, 204 const CFX_Matrix* pObj2Device,
204 CFX_PathData* pClippingPath); 205 CFX_PathData* pClippingPath);
205 void DrawTextPathWithPattern(const CPDF_TextObject* textobj, 206 void DrawTextPathWithPattern(const CPDF_TextObject* textobj,
206 const CFX_Matrix* pObj2Device, 207 const CFX_Matrix* pObj2Device,
207 CPDF_Font* pFont, 208 CPDF_Font* pFont,
208 FX_FLOAT font_size, 209 FX_FLOAT font_size,
209 const CFX_Matrix* pTextMatrix, 210 const CFX_Matrix* pTextMatrix,
210 FX_BOOL bFill, 211 FX_BOOL bFill,
211 FX_BOOL bStroke); 212 FX_BOOL bStroke);
212 FX_BOOL ProcessForm(CPDF_FormObject* pFormObj, const CFX_Matrix* pObj2Device); 213 FX_BOOL ProcessForm(const CPDF_FormObject* pFormObj,
214 const CFX_Matrix* pObj2Device);
213 CFX_DIBitmap* GetBackdrop(const CPDF_PageObject* pObj, 215 CFX_DIBitmap* GetBackdrop(const CPDF_PageObject* pObj,
214 const FX_RECT& rect, 216 const FX_RECT& rect,
215 int& left, 217 int& left,
216 int& top, 218 int& top,
217 FX_BOOL bBackAlphaRequired); 219 FX_BOOL bBackAlphaRequired);
218 CFX_DIBitmap* LoadSMask(CPDF_Dictionary* pSMaskDict, 220 CFX_DIBitmap* LoadSMask(CPDF_Dictionary* pSMaskDict,
219 FX_RECT* pClipRect, 221 FX_RECT* pClipRect,
220 const CFX_Matrix* pMatrix); 222 const CFX_Matrix* pMatrix);
221 void Init(CPDF_RenderContext* pParent); 223 void Init(CPDF_RenderContext* pParent);
222 static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); 224 static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont);
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 const uint8_t* m_RampB; 610 const uint8_t* m_RampB;
609 }; 611 };
610 612
611 struct _CPDF_UniqueKeyGen { 613 struct _CPDF_UniqueKeyGen {
612 void Generate(int count, ...); 614 void Generate(int count, ...);
613 FX_CHAR m_Key[128]; 615 FX_CHAR m_Key[128];
614 int m_KeyLen; 616 int m_KeyLen;
615 }; 617 };
616 618
617 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 619 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp ('k') | core/src/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698