| 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_RENDER_RENDER_INT_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| 8 #define CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 8 #define CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 CPDF_Document* m_pPDFDoc; | 116 CPDF_Document* m_pPDFDoc; |
| 117 CFX_FontCache* m_pFontCache; | 117 CFX_FontCache* m_pFontCache; |
| 118 CPDF_Type3CacheMap m_Type3FaceMap; | 118 CPDF_Type3CacheMap m_Type3FaceMap; |
| 119 CPDF_TransferFuncMap m_TransferFuncMap; | 119 CPDF_TransferFuncMap m_TransferFuncMap; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 class CPDF_RenderStatus { | 122 class CPDF_RenderStatus { |
| 123 public: | 123 public: |
| 124 CPDF_RenderStatus(); | 124 CPDF_RenderStatus(); |
| 125 ~CPDF_RenderStatus(); | 125 ~CPDF_RenderStatus(); |
| 126 |
| 126 FX_BOOL Initialize(class CPDF_RenderContext* pContext, | 127 FX_BOOL Initialize(class CPDF_RenderContext* pContext, |
| 127 CFX_RenderDevice* pDevice, | 128 CFX_RenderDevice* pDevice, |
| 128 const CFX_Matrix* pDeviceMatrix, | 129 const CFX_Matrix* pDeviceMatrix, |
| 129 const CPDF_PageObject* pStopObj, | 130 const CPDF_PageObject* pStopObj, |
| 130 const CPDF_RenderStatus* pParentStatus, | 131 const CPDF_RenderStatus* pParentStatus, |
| 131 const CPDF_GraphicStates* pInitialStates, | 132 const CPDF_GraphicStates* pInitialStates, |
| 132 const CPDF_RenderOptions* pOptions, | 133 const CPDF_RenderOptions* pOptions, |
| 133 int transparency, | 134 int transparency, |
| 134 FX_BOOL bDropObjects, | 135 FX_BOOL bDropObjects, |
| 135 CPDF_Dictionary* pFormResource = NULL, | 136 CPDF_Dictionary* pFormResource = NULL, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 148 CPDF_RenderContext* GetContext() { return m_pContext; } | 149 CPDF_RenderContext* GetContext() { return m_pContext; } |
| 149 | 150 |
| 150 CPDF_RenderOptions m_Options; | 151 CPDF_RenderOptions m_Options; |
| 151 CPDF_Dictionary* m_pFormResource; | 152 CPDF_Dictionary* m_pFormResource; |
| 152 CPDF_Dictionary* m_pPageResource; | 153 CPDF_Dictionary* m_pPageResource; |
| 153 CFX_ArrayTemplate<CPDF_Type3Font*> m_Type3FontCache; | 154 CFX_ArrayTemplate<CPDF_Type3Font*> m_Type3FontCache; |
| 154 | 155 |
| 155 protected: | 156 protected: |
| 156 friend class CPDF_ImageRenderer; | 157 friend class CPDF_ImageRenderer; |
| 157 friend class CPDF_RenderContext; | 158 friend class CPDF_RenderContext; |
| 159 |
| 158 void ProcessClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device); | 160 void ProcessClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device); |
| 159 void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device); | 161 void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device); |
| 160 FX_BOOL ProcessTransparency(const CPDF_PageObject* PageObj, | 162 FX_BOOL ProcessTransparency(const CPDF_PageObject* PageObj, |
| 161 const CFX_Matrix* pObj2Device); | 163 const CFX_Matrix* pObj2Device); |
| 162 void ProcessObjectNoClip(const CPDF_PageObject* PageObj, | 164 void ProcessObjectNoClip(const CPDF_PageObject* PageObj, |
| 163 const CFX_Matrix* pObj2Device); | 165 const CFX_Matrix* pObj2Device); |
| 164 void DrawObjWithBackground(const CPDF_PageObject* pObj, | 166 void DrawObjWithBackground(const CPDF_PageObject* pObj, |
| 165 const CFX_Matrix* pObj2Device); | 167 const CFX_Matrix* pObj2Device); |
| 166 FX_BOOL DrawObjWithBlend(const CPDF_PageObject* pObj, | 168 FX_BOOL DrawObjWithBlend(const CPDF_PageObject* pObj, |
| 167 const CFX_Matrix* pObj2Device); | 169 const CFX_Matrix* pObj2Device); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 FX_RECT* pClipRect, | 237 FX_RECT* pClipRect, |
| 236 const CFX_Matrix* pMatrix); | 238 const CFX_Matrix* pMatrix); |
| 237 void Init(CPDF_RenderContext* pParent); | 239 void Init(CPDF_RenderContext* pParent); |
| 238 static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); | 240 static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); |
| 239 static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj, | 241 static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj, |
| 240 FX_BOOL bStroke); | 242 FX_BOOL bStroke); |
| 241 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObject) const; | 243 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObject) const; |
| 242 FX_ARGB GetFillArgb(const CPDF_PageObject* pObj, | 244 FX_ARGB GetFillArgb(const CPDF_PageObject* pObj, |
| 243 FX_BOOL bType3 = FALSE) const; | 245 FX_BOOL bType3 = FALSE) const; |
| 244 FX_ARGB GetStrokeArgb(const CPDF_PageObject* pObj) const; | 246 FX_ARGB GetStrokeArgb(const CPDF_PageObject* pObj) const; |
| 245 CPDF_RenderContext* m_pContext; | |
| 246 FX_BOOL m_bStopped; | |
| 247 void DitherObjectArea(const CPDF_PageObject* pObj, | |
| 248 const CFX_Matrix* pObj2Device); | |
| 249 FX_BOOL GetObjectClippedRect(const CPDF_PageObject* pObj, | 247 FX_BOOL GetObjectClippedRect(const CPDF_PageObject* pObj, |
| 250 const CFX_Matrix* pObj2Device, | 248 const CFX_Matrix* pObj2Device, |
| 251 FX_BOOL bLogical, | 249 FX_BOOL bLogical, |
| 252 FX_RECT& rect) const; | 250 FX_RECT& rect) const; |
| 253 void GetScaledMatrix(CFX_Matrix& matrix) const; | 251 void GetScaledMatrix(CFX_Matrix& matrix) const; |
| 254 | 252 |
| 255 protected: | |
| 256 static const int kRenderMaxRecursionDepth = 64; | 253 static const int kRenderMaxRecursionDepth = 64; |
| 257 static int s_CurrentRecursionDepth; | 254 static int s_CurrentRecursionDepth; |
| 258 | 255 |
| 256 CPDF_RenderContext* m_pContext; |
| 257 FX_BOOL m_bStopped; |
| 259 CFX_RenderDevice* m_pDevice; | 258 CFX_RenderDevice* m_pDevice; |
| 260 CFX_Matrix m_DeviceMatrix; | 259 CFX_Matrix m_DeviceMatrix; |
| 261 CPDF_ClipPath m_LastClipPath; | 260 CPDF_ClipPath m_LastClipPath; |
| 262 const CPDF_PageObject* m_pCurObj; | 261 const CPDF_PageObject* m_pCurObj; |
| 263 const CPDF_PageObject* m_pStopObj; | 262 const CPDF_PageObject* m_pStopObj; |
| 264 CPDF_GraphicStates m_InitialStates; | 263 CPDF_GraphicStates m_InitialStates; |
| 265 int m_HalftoneLimit; | 264 int m_HalftoneLimit; |
| 266 std::unique_ptr<CPDF_ImageRenderer> m_pImageRenderer; | 265 std::unique_ptr<CPDF_ImageRenderer> m_pImageRenderer; |
| 267 FX_BOOL m_bPrint; | 266 FX_BOOL m_bPrint; |
| 268 int m_Transparency; | 267 int m_Transparency; |
| 269 int m_DitherBits; | |
| 270 FX_BOOL m_bDropObjects; | 268 FX_BOOL m_bDropObjects; |
| 271 FX_BOOL m_bStdCS; | 269 FX_BOOL m_bStdCS; |
| 272 uint32_t m_GroupFamily; | 270 uint32_t m_GroupFamily; |
| 273 FX_BOOL m_bLoadMask; | 271 FX_BOOL m_bLoadMask; |
| 274 CPDF_Type3Char* m_pType3Char; | 272 CPDF_Type3Char* m_pType3Char; |
| 275 FX_ARGB m_T3FillColor; | 273 FX_ARGB m_T3FillColor; |
| 276 int m_curBlend; | 274 int m_curBlend; |
| 277 }; | 275 }; |
| 276 |
| 278 class CPDF_ImageLoader { | 277 class CPDF_ImageLoader { |
| 279 public: | 278 public: |
| 280 CPDF_ImageLoader() | 279 CPDF_ImageLoader() |
| 281 : m_pBitmap(nullptr), | 280 : m_pBitmap(nullptr), |
| 282 m_pMask(nullptr), | 281 m_pMask(nullptr), |
| 283 m_MatteColor(0), | 282 m_MatteColor(0), |
| 284 m_bCached(FALSE), | 283 m_bCached(FALSE), |
| 285 m_nDownsampleWidth(0), | 284 m_nDownsampleWidth(0), |
| 286 m_nDownsampleHeight(0) {} | 285 m_nDownsampleHeight(0) {} |
| 287 ~CPDF_ImageLoader(); | 286 ~CPDF_ImageLoader(); |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 const uint8_t* src_buf, | 617 const uint8_t* src_buf, |
| 619 int pixels, | 618 int pixels, |
| 620 int Bpp) const override; | 619 int Bpp) const override; |
| 621 | 620 |
| 622 const uint8_t* m_RampR; | 621 const uint8_t* m_RampR; |
| 623 const uint8_t* m_RampG; | 622 const uint8_t* m_RampG; |
| 624 const uint8_t* m_RampB; | 623 const uint8_t* m_RampB; |
| 625 }; | 624 }; |
| 626 | 625 |
| 627 #endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 626 #endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| OLD | NEW |