| 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 _FPDF_PAGEOBJ_H_ | 7 #ifndef _FPDF_PAGEOBJ_H_ |
| 8 #include "../../../include/fpdfapi/fpdf_pageobj.h" | 8 #include "../../../include/fpdfapi/fpdf_pageobj.h" |
| 9 #endif | 9 #endif |
| 10 class CPDF_QuickStretcher; | 10 class CPDF_QuickStretcher; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 virtual ~IPDF_ObjectRenderer() {} | 85 virtual ~IPDF_ObjectRenderer() {} |
| 86 virtual FX_BOOL Start(CPDF_RenderStatus* pRenderStatus, const CPDF_PageObjec
t* pObj, const CFX_AffineMatrix* pObj2Device, FX_BOOL bStdCS, int blendType = FX
DIB_BLEND_NORMAL) = 0; | 86 virtual FX_BOOL Start(CPDF_RenderStatus* pRenderStatus, const CPDF_PageObjec
t* pObj, const CFX_AffineMatrix* pObj2Device, FX_BOOL bStdCS, int blendType = FX
DIB_BLEND_NORMAL) = 0; |
| 87 virtual FX_BOOL Continue(IFX_Pause* pPause) = 0; | 87 virtual FX_BOOL Continue(IFX_Pause* pPause) = 0; |
| 88 FX_BOOL m_Result; | 88 FX_BOOL m_Result; |
| 89 }; | 89 }; |
| 90 class CPDF_RenderStatus : public CFX_Object | 90 class CPDF_RenderStatus : public CFX_Object |
| 91 { | 91 { |
| 92 public: | 92 public: |
| 93 CPDF_RenderStatus(); | 93 CPDF_RenderStatus(); |
| 94 ~CPDF_RenderStatus(); | 94 ~CPDF_RenderStatus(); |
| 95 FX_BOOL» » » Initialize(int level, class CPDF_RenderContext*
pContext, CFX_RenderDevice* pDevice, const CFX_AffineMatrix* pDeviceMatrix, | 95 FX_BOOL» » » Initialize(class CPDF_RenderContext* pContext, C
FX_RenderDevice* pDevice, const CFX_AffineMatrix* pDeviceMatrix, |
| 96 const CPDF_PageObject* pStopObj, const CPDF_Rende
rStatus* pParentStatus, | 96 const CPDF_PageObject* pStopObj, const CPDF_Rende
rStatus* pParentStatus, |
| 97 const CPDF_GraphicStates* pInitialStates, const C
PDF_RenderOptions* pOptions, | 97 const CPDF_GraphicStates* pInitialStates, const C
PDF_RenderOptions* pOptions, |
| 98 int transparency, FX_BOOL bDropObjects, CPDF_Dict
ionary* pFormResource = NULL, | 98 int transparency, FX_BOOL bDropObjects, CPDF_Dict
ionary* pFormResource = NULL, |
| 99 FX_BOOL bStdCS = FALSE, CPDF_Type3Char* pType3Ch
ar = NULL, FX_ARGB fill_color = 0, | 99 FX_BOOL bStdCS = FALSE, CPDF_Type3Char* pType3Ch
ar = NULL, FX_ARGB fill_color = 0, |
| 100 FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FAL
SE); | 100 FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FAL
SE); |
| 101 void RenderObjectList(const CPDF_PageObjects* pObjs,
const CFX_AffineMatrix* pObj2Device); | 101 void RenderObjectList(const CPDF_PageObjects* pObjs,
const CFX_AffineMatrix* pObj2Device); |
| 102 void RenderSingleObject(const CPDF_PageObject* pObj,
const CFX_AffineMatrix* pObj2Device); | 102 void RenderSingleObject(const CPDF_PageObject* pObj,
const CFX_AffineMatrix* pObj2Device); |
| 103 FX_BOOL ContinueSingleObject(const CPDF_PageObject* pObj
, const CFX_AffineMatrix* pObj2Device, IFX_Pause* pPause); | 103 FX_BOOL ContinueSingleObject(const CPDF_PageObject* pObj
, const CFX_AffineMatrix* pObj2Device, IFX_Pause* pPause); |
| 104 CPDF_RenderOptions m_Options; | 104 CPDF_RenderOptions m_Options; |
| 105 CPDF_Dictionary* m_pFormResource; | 105 CPDF_Dictionary* m_pFormResource; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); | 148 static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); |
| 149 static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj
, FX_BOOL bStroke); | 149 static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj
, FX_BOOL bStroke); |
| 150 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObject) const; | 150 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObject) const; |
| 151 FX_ARGB GetFillArgb(const CPDF_PageObject* pObj, FX_BOOL
bType3 = FALSE) const; | 151 FX_ARGB GetFillArgb(const CPDF_PageObject* pObj, FX_BOOL
bType3 = FALSE) const; |
| 152 FX_ARGB GetStrokeArgb(const CPDF_PageObject* pObj) const
; | 152 FX_ARGB GetStrokeArgb(const CPDF_PageObject* pObj) const
; |
| 153 CPDF_RenderContext* m_pContext; | 153 CPDF_RenderContext* m_pContext; |
| 154 FX_BOOL m_bStopped; | 154 FX_BOOL m_bStopped; |
| 155 void DitherObjectArea(const CPDF_PageObject* pObj, co
nst CFX_AffineMatrix* pObj2Device); | 155 void DitherObjectArea(const CPDF_PageObject* pObj, co
nst CFX_AffineMatrix* pObj2Device); |
| 156 FX_BOOL GetObjectClippedRect(const CPDF_PageObject* pObj
, const CFX_AffineMatrix* pObj2Device, FX_BOOL bLogical, FX_RECT &rect) const; | 156 FX_BOOL GetObjectClippedRect(const CPDF_PageObject* pObj
, const CFX_AffineMatrix* pObj2Device, FX_BOOL bLogical, FX_RECT &rect) const; |
| 157 void GetScaledMatrix(CFX_Matrix &matrix) const; | 157 void GetScaledMatrix(CFX_Matrix &matrix) const; |
| 158 |
| 158 protected: | 159 protected: |
| 159 int»» » » » » m_Level; | 160 static const int kRenderMaxRecursionDepth = 64; |
| 161 static int s_CurrentRecursionDepth; |
| 162 |
| 160 CFX_RenderDevice* m_pDevice; | 163 CFX_RenderDevice* m_pDevice; |
| 161 CFX_AffineMatrix m_DeviceMatrix; | 164 CFX_AffineMatrix m_DeviceMatrix; |
| 162 CPDF_ClipPath m_LastClipPath; | 165 CPDF_ClipPath m_LastClipPath; |
| 163 const CPDF_PageObject* m_pCurObj; | 166 const CPDF_PageObject* m_pCurObj; |
| 164 const CPDF_PageObject* m_pStopObj; | 167 const CPDF_PageObject* m_pStopObj; |
| 165 CPDF_GraphicStates m_InitialStates; | 168 CPDF_GraphicStates m_InitialStates; |
| 166 int m_HalftoneLimit; | 169 int m_HalftoneLimit; |
| 167 IPDF_ObjectRenderer* m_pObjectRenderer; | 170 IPDF_ObjectRenderer* m_pObjectRenderer; |
| 168 FX_BOOL m_bPrint; | 171 FX_BOOL m_bPrint; |
| 169 int m_Transparency; | 172 int m_Transparency; |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 virtual void TranslateDownSamples(FX_LPBYTE dest_buf,
FX_LPCBYTE src_buf, int pixels, int Bpp) const; | 452 virtual void TranslateDownSamples(FX_LPBYTE dest_buf,
FX_LPCBYTE src_buf, int pixels, int Bpp) const; |
| 450 FX_LPCBYTE m_RampR; | 453 FX_LPCBYTE m_RampR; |
| 451 FX_LPCBYTE m_RampG; | 454 FX_LPCBYTE m_RampG; |
| 452 FX_LPCBYTE m_RampB; | 455 FX_LPCBYTE m_RampB; |
| 453 }; | 456 }; |
| 454 struct _CPDF_UniqueKeyGen { | 457 struct _CPDF_UniqueKeyGen { |
| 455 void Generate(int count, ...); | 458 void Generate(int count, ...); |
| 456 FX_CHAR m_Key[128]; | 459 FX_CHAR m_Key[128]; |
| 457 int m_KeyLen; | 460 int m_KeyLen; |
| 458 }; | 461 }; |
| OLD | NEW |