| 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_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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 protected: | 42 protected: |
| 43 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, FX_DWORD ch
arcode, const CFX_AffineMatrix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT
retinaScaleY = 1.0f); | 43 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, FX_DWORD ch
arcode, const CFX_AffineMatrix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT
retinaScaleY = 1.0f); |
| 44 CPDF_Type3Font* m_pFont; | 44 CPDF_Type3Font* m_pFont; |
| 45 CFX_MapByteStringToPtr m_SizeMap; | 45 CFX_MapByteStringToPtr m_SizeMap; |
| 46 }; | 46 }; |
| 47 class CPDF_TransferFunc | 47 class CPDF_TransferFunc |
| 48 { | 48 { |
| 49 public: | 49 public: |
| 50 CPDF_Document* m_pPDFDoc; | 50 CPDF_Document* m_pPDFDoc; |
| 51 uint8_t m_Samples[256 * 3]; | 51 uint8_t m_Samples[256 * 3]; |
| 52 FX_BOOL» » » m_bIdentity; | 52 bool» » » m_bIdentity; |
| 53 | 53 |
| 54 CFX_DIBSource*» TranslateImage(const CFX_DIBSource* pSrc, FX_BOOL bAutoD
ropSrc); | 54 CFX_DIBSource*» TranslateImage(const CFX_DIBSource* pSrc, bool bAutoDrop
Src); |
| 55 FX_COLORREF TranslateColor(FX_COLORREF src); | 55 FX_COLORREF TranslateColor(FX_COLORREF src); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 class CPDF_DocRenderData | 58 class CPDF_DocRenderData |
| 59 { | 59 { |
| 60 public: | 60 public: |
| 61 CPDF_DocRenderData(CPDF_Document* pPDFDoc = NULL); | 61 CPDF_DocRenderData(CPDF_Document* pPDFDoc = NULL); |
| 62 ~CPDF_DocRenderData(); | 62 ~CPDF_DocRenderData(); |
| 63 CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); | 63 CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); |
| 64 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObj); | 64 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObj); |
| 65 CFX_FontCache* GetFontCache() | 65 CFX_FontCache* GetFontCache() |
| 66 { | 66 { |
| 67 return m_pFontCache; | 67 return m_pFontCache; |
| 68 } | 68 } |
| 69 void» » » » Clear(FX_BOOL bRelease = FALSE); | 69 void» » » » Clear(bool bRelease = false); |
| 70 void ReleaseCachedType3(CPDF_Type3Font* pFont
); | 70 void ReleaseCachedType3(CPDF_Type3Font* pFont
); |
| 71 void ReleaseTransferFunc(CPDF_Object* pObj); | 71 void ReleaseTransferFunc(CPDF_Object* pObj); |
| 72 private: | 72 private: |
| 73 using CPDF_Type3CacheMap = | 73 using CPDF_Type3CacheMap = |
| 74 std::map<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache>*>; | 74 std::map<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache>*>; |
| 75 using CPDF_TransferFuncMap = | 75 using CPDF_TransferFuncMap = |
| 76 std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*> ; | 76 std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*> ; |
| 77 | 77 |
| 78 CPDF_Document* m_pPDFDoc; | 78 CPDF_Document* m_pPDFDoc; |
| 79 CFX_FontCache* m_pFontCache; | 79 CFX_FontCache* m_pFontCache; |
| 80 CPDF_Type3CacheMap m_Type3FaceMap; | 80 CPDF_Type3CacheMap m_Type3FaceMap; |
| 81 CPDF_TransferFuncMap m_TransferFuncMap; | 81 CPDF_TransferFuncMap m_TransferFuncMap; |
| 82 }; | 82 }; |
| 83 struct _PDF_RenderItem { | 83 struct _PDF_RenderItem { |
| 84 public: | 84 public: |
| 85 CPDF_PageObjects* m_pObjectList; | 85 CPDF_PageObjects* m_pObjectList; |
| 86 CFX_AffineMatrix m_Matrix; | 86 CFX_AffineMatrix m_Matrix; |
| 87 }; | 87 }; |
| 88 typedef CFX_ArrayTemplate<_PDF_RenderItem> CPDF_RenderLayer; | 88 typedef CFX_ArrayTemplate<_PDF_RenderItem> CPDF_RenderLayer; |
| 89 class IPDF_ObjectRenderer | 89 class IPDF_ObjectRenderer |
| 90 { | 90 { |
| 91 public: | 91 public: |
| 92 static IPDF_ObjectRenderer* Create(int type); | 92 static IPDF_ObjectRenderer* Create(int type); |
| 93 virtual ~IPDF_ObjectRenderer() {} | 93 virtual ~IPDF_ObjectRenderer() {} |
| 94 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; | 94 virtual bool Start(CPDF_RenderStatus* pRenderStatus, const CPDF_PageObject*
pObj, const CFX_AffineMatrix* pObj2Device, bool bStdCS, int blendType = FXDIB_BL
END_NORMAL) = 0; |
| 95 virtual FX_BOOL Continue(IFX_Pause* pPause) = 0; | 95 virtual bool Continue(IFX_Pause* pPause) = 0; |
| 96 FX_BOOL» » m_Result; | 96 bool» » m_Result; |
| 97 }; | 97 }; |
| 98 class CPDF_RenderStatus | 98 class CPDF_RenderStatus |
| 99 { | 99 { |
| 100 public: | 100 public: |
| 101 CPDF_RenderStatus(); | 101 CPDF_RenderStatus(); |
| 102 ~CPDF_RenderStatus(); | 102 ~CPDF_RenderStatus(); |
| 103 FX_BOOL» » » Initialize(class CPDF_RenderContext* pContext, C
FX_RenderDevice* pDevice, const CFX_AffineMatrix* pDeviceMatrix, | 103 bool» » » Initialize(class CPDF_RenderContext* pContext, C
FX_RenderDevice* pDevice, const CFX_AffineMatrix* pDeviceMatrix, |
| 104 const CPDF_PageObject* pStopObj, const CPDF_Rende
rStatus* pParentStatus, | 104 const CPDF_PageObject* pStopObj, const CPDF_Rende
rStatus* pParentStatus, |
| 105 const CPDF_GraphicStates* pInitialStates, const C
PDF_RenderOptions* pOptions, | 105 const CPDF_GraphicStates* pInitialStates, const C
PDF_RenderOptions* pOptions, |
| 106 int transparency, FX_BOOL bDropObjects, CPDF_Dict
ionary* pFormResource = NULL, | 106 int transparency, bool bDropObjects, CPDF_Diction
ary* pFormResource = NULL, |
| 107 FX_BOOL bStdCS = FALSE,» CPDF_Type3Char* pType3Ch
ar = NULL, FX_ARGB fill_color = 0, | 107 bool bStdCS = false,» CPDF_Type3Char* pType3Ch
ar = NULL, FX_ARGB fill_color = 0, |
| 108 FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FAL
SE); | 108 FX_DWORD GroupFamily = 0, bool bLoadMask = false)
; |
| 109 void RenderObjectList(const CPDF_PageObjects* pObjs,
const CFX_AffineMatrix* pObj2Device); | 109 void RenderObjectList(const CPDF_PageObjects* pObjs,
const CFX_AffineMatrix* pObj2Device); |
| 110 void RenderSingleObject(const CPDF_PageObject* pObj,
const CFX_AffineMatrix* pObj2Device); | 110 void RenderSingleObject(const CPDF_PageObject* pObj,
const CFX_AffineMatrix* pObj2Device); |
| 111 FX_BOOL» » » ContinueSingleObject(const CPDF_PageObject* pObj
, const CFX_AffineMatrix* pObj2Device, IFX_Pause* pPause); | 111 bool» » » ContinueSingleObject(const CPDF_PageObject* pObj
, const CFX_AffineMatrix* pObj2Device, IFX_Pause* pPause); |
| 112 CPDF_RenderOptions m_Options; | 112 CPDF_RenderOptions m_Options; |
| 113 CPDF_Dictionary* m_pFormResource; | 113 CPDF_Dictionary* m_pFormResource; |
| 114 CPDF_Dictionary* m_pPageResource; | 114 CPDF_Dictionary* m_pPageResource; |
| 115 CFX_PtrArray m_Type3FontCache; | 115 CFX_PtrArray m_Type3FontCache; |
| 116 CPDF_RenderContext* GetContext() | 116 CPDF_RenderContext* GetContext() |
| 117 { | 117 { |
| 118 return m_pContext; | 118 return m_pContext; |
| 119 } | 119 } |
| 120 protected: | 120 protected: |
| 121 friend class CPDF_ImageRenderer; | 121 friend class CPDF_ImageRenderer; |
| 122 friend class CPDF_RenderContext; | 122 friend class CPDF_RenderContext; |
| 123 void ProcessClipPath(CPDF_ClipPath ClipPath, const CF
X_AffineMatrix* pObj2Device); | 123 void ProcessClipPath(CPDF_ClipPath ClipPath, const CF
X_AffineMatrix* pObj2Device); |
| 124 void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_A
ffineMatrix* pObj2Device); | 124 void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_A
ffineMatrix* pObj2Device); |
| 125 FX_BOOL» » » ProcessTransparency(const CPDF_PageObject* PageO
bj, const CFX_AffineMatrix* pObj2Device); | 125 bool» » » ProcessTransparency(const CPDF_PageObject* PageO
bj, const CFX_AffineMatrix* pObj2Device); |
| 126 void ProcessObjectNoClip(const CPDF_PageObject* PageO
bj, const CFX_AffineMatrix* pObj2Device); | 126 void ProcessObjectNoClip(const CPDF_PageObject* PageO
bj, const CFX_AffineMatrix* pObj2Device); |
| 127 void DrawObjWithBackground(const CPDF_PageObject* pOb
j, const CFX_AffineMatrix* pObj2Device); | 127 void DrawObjWithBackground(const CPDF_PageObject* pOb
j, const CFX_AffineMatrix* pObj2Device); |
| 128 FX_BOOL DrawObjWithBlend(const CPDF_PageObject* pObj, const CFX_Affi
neMatrix* pObj2Device); | 128 bool DrawObjWithBlend(const CPDF_PageObject* pObj, const CFX_AffineM
atrix* pObj2Device); |
| 129 FX_BOOL» » » ProcessPath(CPDF_PathObject* pPathObj, const CFX
_AffineMatrix* pObj2Device); | 129 bool» » » ProcessPath(CPDF_PathObject* pPathObj, const CFX
_AffineMatrix* pObj2Device); |
| 130 void» » » ProcessPathPattern(CPDF_PathObject* pPathObj, co
nst CFX_AffineMatrix* pObj2Device, int& filltype, FX_BOOL& bStroke); | 130 void» » » ProcessPathPattern(CPDF_PathObject* pPathObj, co
nst CFX_AffineMatrix* pObj2Device, int& filltype, bool& bStroke); |
| 131 void» » » DrawPathWithPattern(CPDF_PathObject* pPathObj, c
onst CFX_AffineMatrix* pObj2Device, CPDF_Color* pColor, FX_BOOL bStroke); | 131 void» » » DrawPathWithPattern(CPDF_PathObject* pPathObj, c
onst CFX_AffineMatrix* pObj2Device, CPDF_Color* pColor, bool bStroke); |
| 132 void» » » DrawTilingPattern(CPDF_TilingPattern* pPattern,
CPDF_PageObject* pPageObj, const CFX_AffineMatrix* pObj2Device, FX_BOOL bStroke)
; | 132 void» » » DrawTilingPattern(CPDF_TilingPattern* pPattern,
CPDF_PageObject* pPageObj, const CFX_AffineMatrix* pObj2Device, bool bStroke); |
| 133 void» » » DrawShadingPattern(CPDF_ShadingPattern* pPattern
, CPDF_PageObject* pPageObj, const CFX_AffineMatrix* pObj2Device, FX_BOOL bStrok
e); | 133 void» » » DrawShadingPattern(CPDF_ShadingPattern* pPattern
, CPDF_PageObject* pPageObj, const CFX_AffineMatrix* pObj2Device, bool bStroke); |
| 134 FX_BOOL» » » SelectClipPath(CPDF_PathObject* pPathObj, const
CFX_AffineMatrix* pObj2Device, FX_BOOL bStroke); | 134 bool» » » SelectClipPath(CPDF_PathObject* pPathObj, const
CFX_AffineMatrix* pObj2Device, bool bStroke); |
| 135 FX_BOOL» » » ProcessImage(CPDF_ImageObject* pImageObj, const
CFX_AffineMatrix* pObj2Device); | 135 bool» » » ProcessImage(CPDF_ImageObject* pImageObj, const
CFX_AffineMatrix* pObj2Device); |
| 136 FX_BOOL» » » OutputBitmapAlpha(CPDF_ImageObject* pImageObj, c
onst CFX_AffineMatrix* pImage2Device); | 136 bool» » » OutputBitmapAlpha(CPDF_ImageObject* pImageObj, c
onst CFX_AffineMatrix* pImage2Device); |
| 137 FX_BOOL» » » OutputImage(CPDF_ImageObject* pImageObj, const C
FX_AffineMatrix* pImage2Device); | 137 bool» » » OutputImage(CPDF_ImageObject* pImageObj, const C
FX_AffineMatrix* pImage2Device); |
| 138 FX_BOOL» » » OutputDIBSource(const CFX_DIBSource* pOutputBitm
ap, FX_ARGB fill_argb, int bitmap_alpha, | 138 bool» » » OutputDIBSource(const CFX_DIBSource* pOutputBitm
ap, FX_ARGB fill_argb, int bitmap_alpha, |
| 139 const CFX_AffineMatrix* pImage2Device, CPDF_
ImageCache* pImageCache, FX_DWORD flags); | 139 const CFX_AffineMatrix* pImage2Device, CPDF_
ImageCache* pImageCache, FX_DWORD flags); |
| 140 void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, int l
eft, int top, FX_ARGB mask_argb, | 140 void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, int l
eft, int top, FX_ARGB mask_argb, |
| 141 int bitmap_alpha, int blend_mode, int bIso
lated); | 141 int bitmap_alpha, int blend_mode, int bIso
lated); |
| 142 FX_BOOL» » » ProcessShading(CPDF_ShadingObject* pShadingObj,
const CFX_AffineMatrix* pObj2Device); | 142 bool» » » ProcessShading(CPDF_ShadingObject* pShadingObj,
const CFX_AffineMatrix* pObj2Device); |
| 143 void DrawShading(CPDF_ShadingPattern* pPattern, CFX_A
ffineMatrix* pMatrix, FX_RECT& clip_rect, | 143 void DrawShading(CPDF_ShadingPattern* pPattern, CFX_A
ffineMatrix* pMatrix, FX_RECT& clip_rect, |
| 144 int alpha, FX_BOOL bAlphaMode); | 144 int alpha, bool bAlphaMode); |
| 145 FX_BOOL» » » ProcessType3Text(const CPDF_TextObject* textobj,
const CFX_AffineMatrix* pObj2Device); | 145 bool» » » ProcessType3Text(const CPDF_TextObject* textobj,
const CFX_AffineMatrix* pObj2Device); |
| 146 FX_BOOL» » » ProcessText(const CPDF_TextObject* textobj, cons
t CFX_AffineMatrix* pObj2Device, CFX_PathData* pClippingPath); | 146 bool» » » ProcessText(const CPDF_TextObject* textobj, cons
t CFX_AffineMatrix* pObj2Device, CFX_PathData* pClippingPath); |
| 147 void DrawTextPathWithPattern(const CPDF_TextObject* t
extobj, const CFX_AffineMatrix* pObj2Device, | 147 void DrawTextPathWithPattern(const CPDF_TextObject* t
extobj, const CFX_AffineMatrix* pObj2Device, |
| 148 CPDF_Font* pFont, FX_FLOAT font_size
, | 148 CPDF_Font* pFont, FX_FLOAT font_size
, |
| 149 const CFX_AffineMatrix* pTextMatrix,
FX_BOOL bFill, FX_BOOL bStroke); | 149 const CFX_AffineMatrix* pTextMatrix,
bool bFill, bool bStroke); |
| 150 FX_BOOL» » » ProcessForm(CPDF_FormObject* pFormObj, const CFX
_AffineMatrix* pObj2Device); | 150 bool» » » ProcessForm(CPDF_FormObject* pFormObj, const CFX
_AffineMatrix* pObj2Device); |
| 151 CFX_DIBitmap* GetBackdrop(const CPDF_PageObject* pObj, const FX_RECT&
rect, int& left, int& top, | 151 CFX_DIBitmap* GetBackdrop(const CPDF_PageObject* pObj, const FX_RECT&
rect, int& left, int& top, |
| 152 FX_BOOL bBackAlphaRequired); | 152 bool bBackAlphaRequired); |
| 153 CFX_DIBitmap* LoadSMask(CPDF_Dictionary* pSMaskDict, FX_RECT* pClipRec
t, const CFX_AffineMatrix* pMatrix); | 153 CFX_DIBitmap* LoadSMask(CPDF_Dictionary* pSMaskDict, FX_RECT* pClipRec
t, const CFX_AffineMatrix* pMatrix); |
| 154 void Init(CPDF_RenderContext* pParent); | 154 void Init(CPDF_RenderContext* pParent); |
| 155 static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); | 155 static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); |
| 156 static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj
, FX_BOOL bStroke); | 156 static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj
, bool bStroke); |
| 157 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObject) const; | 157 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObject) const; |
| 158 FX_ARGB» » » GetFillArgb(const CPDF_PageObject* pObj, FX_BOOL
bType3 = FALSE) const; | 158 FX_ARGB» » » GetFillArgb(const CPDF_PageObject* pObj, bool bT
ype3 = false) const; |
| 159 FX_ARGB GetStrokeArgb(const CPDF_PageObject* pObj) const
; | 159 FX_ARGB GetStrokeArgb(const CPDF_PageObject* pObj) const
; |
| 160 CPDF_RenderContext* m_pContext; | 160 CPDF_RenderContext* m_pContext; |
| 161 FX_BOOL» » » » » m_bStopped; | 161 bool» » » » » m_bStopped; |
| 162 void DitherObjectArea(const CPDF_PageObject* pObj, co
nst CFX_AffineMatrix* pObj2Device); | 162 void DitherObjectArea(const CPDF_PageObject* pObj, co
nst CFX_AffineMatrix* pObj2Device); |
| 163 FX_BOOL» » » GetObjectClippedRect(const CPDF_PageObject* pObj
, const CFX_AffineMatrix* pObj2Device, FX_BOOL bLogical, FX_RECT &rect) const; | 163 bool» » » GetObjectClippedRect(const CPDF_PageObject* pObj
, const CFX_AffineMatrix* pObj2Device, bool bLogical, FX_RECT &rect) const; |
| 164 void GetScaledMatrix(CFX_Matrix &matrix) const; | 164 void GetScaledMatrix(CFX_Matrix &matrix) const; |
| 165 | 165 |
| 166 protected: | 166 protected: |
| 167 static const int kRenderMaxRecursionDepth = 64; | 167 static const int kRenderMaxRecursionDepth = 64; |
| 168 static int s_CurrentRecursionDepth; | 168 static int s_CurrentRecursionDepth; |
| 169 | 169 |
| 170 CFX_RenderDevice* m_pDevice; | 170 CFX_RenderDevice* m_pDevice; |
| 171 CFX_AffineMatrix m_DeviceMatrix; | 171 CFX_AffineMatrix m_DeviceMatrix; |
| 172 CPDF_ClipPath m_LastClipPath; | 172 CPDF_ClipPath m_LastClipPath; |
| 173 const CPDF_PageObject* m_pCurObj; | 173 const CPDF_PageObject* m_pCurObj; |
| 174 const CPDF_PageObject* m_pStopObj; | 174 const CPDF_PageObject* m_pStopObj; |
| 175 CPDF_GraphicStates m_InitialStates; | 175 CPDF_GraphicStates m_InitialStates; |
| 176 int m_HalftoneLimit; | 176 int m_HalftoneLimit; |
| 177 IPDF_ObjectRenderer* m_pObjectRenderer; | 177 IPDF_ObjectRenderer* m_pObjectRenderer; |
| 178 FX_BOOL» » » » » m_bPrint; | 178 bool» » » » » m_bPrint; |
| 179 int m_Transparency; | 179 int m_Transparency; |
| 180 int m_DitherBits; | 180 int m_DitherBits; |
| 181 FX_BOOL» » » » » m_bDropObjects; | 181 bool» » » » » m_bDropObjects; |
| 182 FX_BOOL» » » » » m_bStdCS; | 182 bool» » » » » m_bStdCS; |
| 183 FX_DWORD m_GroupFamily; | 183 FX_DWORD m_GroupFamily; |
| 184 FX_BOOL m_bLoadMask; | 184 bool m_bLoadMask; |
| 185 CPDF_Type3Char * m_pType3Char; | 185 CPDF_Type3Char * m_pType3Char; |
| 186 FX_ARGB m_T3FillColor; | 186 FX_ARGB m_T3FillColor; |
| 187 int m_curBlend; | 187 int m_curBlend; |
| 188 }; | 188 }; |
| 189 class CPDF_ImageLoader | 189 class CPDF_ImageLoader |
| 190 { | 190 { |
| 191 public: | 191 public: |
| 192 CPDF_ImageLoader() | 192 CPDF_ImageLoader() |
| 193 { | 193 { |
| 194 m_pBitmap = NULL; | 194 m_pBitmap = NULL; |
| 195 m_pMask = NULL; | 195 m_pMask = NULL; |
| 196 m_MatteColor = 0; | 196 m_MatteColor = 0; |
| 197 m_bCached = FALSE; | 197 m_bCached = false; |
| 198 m_nDownsampleWidth = 0; | 198 m_nDownsampleWidth = 0; |
| 199 m_nDownsampleHeight = 0; | 199 m_nDownsampleHeight = 0; |
| 200 } | 200 } |
| 201 | 201 |
| 202 FX_BOOL» » » » » Load(const CPDF_ImageObject* pIm
age, CPDF_PageRenderCache* pCache, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily
= 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL); | 202 bool» » » » » Load(const CPDF_ImageObject* pIm
age, CPDF_PageRenderCache* pCache, bool bStdCS = false, FX_DWORD GroupFamily = 0
, bool bLoadMask = false, CPDF_RenderStatus* pRenderStatus = NULL); |
| 203 | 203 |
| 204 FX_BOOL» » » » » StartLoadImage(const CPDF_ImageO
bject* pImage, CPDF_PageRenderCache* pCache, void*& LoadHandle, FX_BOOL bStdCS =
FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus*
pRenderStatus = NULL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeight =
0); | 204 bool» » » » » StartLoadImage(const CPDF_ImageO
bject* pImage, CPDF_PageRenderCache* pCache, void*& LoadHandle, bool bStdCS = fa
lse, FX_DWORD GroupFamily = 0, bool bLoadMask = false, CPDF_RenderStatus* pRende
rStatus = NULL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeight = 0); |
| 205 FX_BOOL» » » » » Continue(void* LoadHandle, IFX_P
ause* pPause); | 205 bool» » » » » Continue(void* LoadHandle, IFX_P
ause* pPause); |
| 206 ~CPDF_ImageLoader(); | 206 ~CPDF_ImageLoader(); |
| 207 CFX_DIBSource* m_pBitmap; | 207 CFX_DIBSource* m_pBitmap; |
| 208 CFX_DIBSource* m_pMask; | 208 CFX_DIBSource* m_pMask; |
| 209 FX_DWORD m_MatteColor; | 209 FX_DWORD m_MatteColor; |
| 210 FX_BOOL» » » » » m_bCached; | 210 bool» » » » » m_bCached; |
| 211 protected: | 211 protected: |
| 212 int32_t m_nDownsampleWidth; | 212 int32_t m_nDownsampleWidth; |
| 213 int32_t m_nDownsampleHeight; | 213 int32_t m_nDownsampleHeight; |
| 214 }; | 214 }; |
| 215 class CPDF_ProgressiveImageLoaderHandle | 215 class CPDF_ProgressiveImageLoaderHandle |
| 216 { | 216 { |
| 217 public: | 217 public: |
| 218 CPDF_ProgressiveImageLoaderHandle(); | 218 CPDF_ProgressiveImageLoaderHandle(); |
| 219 ~CPDF_ProgressiveImageLoaderHandle(); | 219 ~CPDF_ProgressiveImageLoaderHandle(); |
| 220 | 220 |
| 221 FX_BOOL» » » Start(CPDF_ImageLoader* pImageLoader, const CPDF
_ImageObject* pImage, CPDF_PageRenderCache* pCache, FX_BOOL bStdCS = FALSE, FX_D
WORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatu
s = NULL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeight = 0); | 221 bool» » » Start(CPDF_ImageLoader* pImageLoader, const CPDF
_ImageObject* pImage, CPDF_PageRenderCache* pCache, bool bStdCS = false, FX_DWOR
D GroupFamily = 0, bool bLoadMask = false, CPDF_RenderStatus* pRenderStatus = NU
LL, int32_t nDownsampleWidth = 0, int32_t nDownsampleHeight = 0); |
| 222 FX_BOOL» » » Continue(IFX_Pause* pPause); | 222 bool» » » Continue(IFX_Pause* pPause); |
| 223 protected: | 223 protected: |
| 224 CPDF_ImageLoader* m_pImageLoader; | 224 CPDF_ImageLoader* m_pImageLoader; |
| 225 CPDF_PageRenderCache* m_pCache; | 225 CPDF_PageRenderCache* m_pCache; |
| 226 CPDF_ImageObject* m_pImage; | 226 CPDF_ImageObject* m_pImage; |
| 227 int32_t m_nDownsampleWidth; | 227 int32_t m_nDownsampleWidth; |
| 228 int32_t m_nDownsampleHeight; | 228 int32_t m_nDownsampleHeight; |
| 229 }; | 229 }; |
| 230 class CFX_ImageTransformer; | 230 class CFX_ImageTransformer; |
| 231 class CPDF_ImageRenderer : public IPDF_ObjectRenderer | 231 class CPDF_ImageRenderer : public IPDF_ObjectRenderer |
| 232 { | 232 { |
| 233 public: | 233 public: |
| 234 CPDF_ImageRenderer(); | 234 CPDF_ImageRenderer(); |
| 235 ~CPDF_ImageRenderer(); | 235 ~CPDF_ImageRenderer(); |
| 236 FX_BOOL» » Start(CPDF_RenderStatus* pStatus, const CPDF_PageObject*
pObj, const CFX_AffineMatrix* pObj2Device, FX_BOOL bStdCS, int blendType = FXDI
B_BLEND_NORMAL); | 236 bool» » Start(CPDF_RenderStatus* pStatus, const CPDF_PageObject*
pObj, const CFX_AffineMatrix* pObj2Device, bool bStdCS, int blendType = FXDIB_B
LEND_NORMAL); |
| 237 FX_BOOL» » Start(CPDF_RenderStatus* pStatus, const CFX_DIBSource* p
DIBSource, FX_ARGB bitmap_argb, | 237 bool» » Start(CPDF_RenderStatus* pStatus, const CFX_DIBSource* p
DIBSource, FX_ARGB bitmap_argb, |
| 238 int bitmap_alpha, const CFX_AffineMatrix* pImage2Device, F
X_DWORD flags, FX_BOOL bStdCS, int blendType = FXDIB_BLEND_NORMAL); | 238 int bitmap_alpha, const CFX_AffineMatrix* pImage2Device, F
X_DWORD flags, bool bStdCS, int blendType = FXDIB_BLEND_NORMAL); |
| 239 FX_BOOL» » Continue(IFX_Pause* pPause); | 239 bool» » Continue(IFX_Pause* pPause); |
| 240 protected: | 240 protected: |
| 241 CPDF_RenderStatus* m_pRenderStatus; | 241 CPDF_RenderStatus* m_pRenderStatus; |
| 242 CPDF_ImageObject* m_pImageObject; | 242 CPDF_ImageObject* m_pImageObject; |
| 243 int m_Status; | 243 int m_Status; |
| 244 const CFX_AffineMatrix* m_pObj2Device; | 244 const CFX_AffineMatrix* m_pObj2Device; |
| 245 CFX_AffineMatrix m_ImageMatrix; | 245 CFX_AffineMatrix m_ImageMatrix; |
| 246 CPDF_ImageLoader m_Loader; | 246 CPDF_ImageLoader m_Loader; |
| 247 const CFX_DIBSource* m_pDIBSource; | 247 const CFX_DIBSource* m_pDIBSource; |
| 248 CFX_DIBitmap* m_pClone; | 248 CFX_DIBitmap* m_pClone; |
| 249 int m_BitmapAlpha; | 249 int m_BitmapAlpha; |
| 250 FX_BOOL» » » » m_bPatternColor; | 250 bool» » » » m_bPatternColor; |
| 251 CPDF_Pattern* m_pPattern; | 251 CPDF_Pattern* m_pPattern; |
| 252 FX_ARGB m_FillArgb; | 252 FX_ARGB m_FillArgb; |
| 253 FX_DWORD m_Flags; | 253 FX_DWORD m_Flags; |
| 254 CPDF_QuickStretcher* m_pQuickStretcher; | 254 CPDF_QuickStretcher* m_pQuickStretcher; |
| 255 CFX_ImageTransformer* m_pTransformer; | 255 CFX_ImageTransformer* m_pTransformer; |
| 256 CPDF_ImageRenderer* m_pRenderer2; | 256 CPDF_ImageRenderer* m_pRenderer2; |
| 257 void* m_DeviceHandle; | 257 void* m_DeviceHandle; |
| 258 void* m_LoadHandle; | 258 void* m_LoadHandle; |
| 259 FX_BOOL» » » » m_bStdCS; | 259 bool» » » » m_bStdCS; |
| 260 int m_BlendType; | 260 int m_BlendType; |
| 261 FX_BOOL» » » » StartBitmapAlpha(); | 261 bool» » » » StartBitmapAlpha(); |
| 262 FX_BOOL» » » » StartDIBSource(); | 262 bool» » » » StartDIBSource(); |
| 263 FX_BOOL» » » » StartRenderDIBSource(); | 263 bool» » » » StartRenderDIBSource(); |
| 264 FX_BOOL» » » » StartLoadDIBSource(); | 264 bool» » » » StartLoadDIBSource(); |
| 265 FX_BOOL» » » » DrawMaskedImage(); | 265 bool» » » » DrawMaskedImage(); |
| 266 FX_BOOL» » » » DrawPatternImage(const CFX_Matrix* pObj2
Device); | 266 bool» » » » DrawPatternImage(const CFX_Matrix* pObj2
Device); |
| 267 }; | 267 }; |
| 268 class CPDF_ScaledRenderBuffer | 268 class CPDF_ScaledRenderBuffer |
| 269 { | 269 { |
| 270 public: | 270 public: |
| 271 CPDF_ScaledRenderBuffer(); | 271 CPDF_ScaledRenderBuffer(); |
| 272 ~CPDF_ScaledRenderBuffer(); | 272 ~CPDF_ScaledRenderBuffer(); |
| 273 FX_BOOL» » » » Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice, FX_RECT* pRect, | 273 bool» » » » Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice, FX_RECT* pRect, |
| 274 const CPDF_PageObject* pObj, const CPDF_Rende
rOptions *pOptions = NULL, int max_dpi = 0); | 274 const CPDF_PageObject* pObj, const CPDF_Rende
rOptions *pOptions = NULL, int max_dpi = 0); |
| 275 CFX_RenderDevice* GetDevice() | 275 CFX_RenderDevice* GetDevice() |
| 276 { | 276 { |
| 277 return m_pBitmapDevice ? m_pBitmapDevice : m_pDevice; | 277 return m_pBitmapDevice ? m_pBitmapDevice : m_pDevice; |
| 278 } | 278 } |
| 279 CFX_AffineMatrix* GetMatrix() | 279 CFX_AffineMatrix* GetMatrix() |
| 280 { | 280 { |
| 281 return &m_Matrix; | 281 return &m_Matrix; |
| 282 } | 282 } |
| 283 void OutputToDevice(); | 283 void OutputToDevice(); |
| 284 private: | 284 private: |
| 285 CFX_RenderDevice* m_pDevice; | 285 CFX_RenderDevice* m_pDevice; |
| 286 CPDF_RenderContext* m_pContext; | 286 CPDF_RenderContext* m_pContext; |
| 287 FX_RECT m_Rect; | 287 FX_RECT m_Rect; |
| 288 const CPDF_PageObject* m_pObject; | 288 const CPDF_PageObject* m_pObject; |
| 289 CFX_FxgeDevice* m_pBitmapDevice; | 289 CFX_FxgeDevice* m_pBitmapDevice; |
| 290 CFX_AffineMatrix m_Matrix; | 290 CFX_AffineMatrix m_Matrix; |
| 291 }; | 291 }; |
| 292 class ICodec_ScanlineDecoder; | 292 class ICodec_ScanlineDecoder; |
| 293 class CPDF_QuickStretcher | 293 class CPDF_QuickStretcher |
| 294 { | 294 { |
| 295 public: | 295 public: |
| 296 CPDF_QuickStretcher(); | 296 CPDF_QuickStretcher(); |
| 297 ~CPDF_QuickStretcher(); | 297 ~CPDF_QuickStretcher(); |
| 298 FX_BOOL» » Start(CPDF_ImageObject* pImageObj, CFX_AffineMatrix* pIm
age2Device, const FX_RECT* pClipBox); | 298 bool» » Start(CPDF_ImageObject* pImageObj, CFX_AffineMatrix* pIm
age2Device, const FX_RECT* pClipBox); |
| 299 FX_BOOL» » Continue(IFX_Pause* pPause); | 299 bool» » Continue(IFX_Pause* pPause); |
| 300 CFX_DIBitmap* m_pBitmap; | 300 CFX_DIBitmap* m_pBitmap; |
| 301 int m_ResultLeft, m_ResultTop, m_ClipLeft, m_ClipTop; | 301 int m_ResultLeft, m_ResultTop, m_ClipLeft, m_ClipTop; |
| 302 int m_DestWidth, m_DestHeight, m_ResultWidth, m_ResultHeight
; | 302 int m_DestWidth, m_DestHeight, m_ResultWidth, m_ResultHeight
; |
| 303 int m_Bpp, m_SrcWidth, m_SrcHeight; | 303 int m_Bpp, m_SrcWidth, m_SrcHeight; |
| 304 FX_BOOL» » m_bFlipX, m_bFlipY; | 304 bool» » m_bFlipX, m_bFlipY; |
| 305 CPDF_ColorSpace* m_pCS; | 305 CPDF_ColorSpace* m_pCS; |
| 306 ICodec_ScanlineDecoder* m_pDecoder; | 306 ICodec_ScanlineDecoder* m_pDecoder; |
| 307 CPDF_StreamAcc m_StreamAcc; | 307 CPDF_StreamAcc m_StreamAcc; |
| 308 int m_LineIndex; | 308 int m_LineIndex; |
| 309 }; | 309 }; |
| 310 class CPDF_DeviceBuffer | 310 class CPDF_DeviceBuffer |
| 311 { | 311 { |
| 312 public: | 312 public: |
| 313 CPDF_DeviceBuffer(); | 313 CPDF_DeviceBuffer(); |
| 314 ~CPDF_DeviceBuffer(); | 314 ~CPDF_DeviceBuffer(); |
| 315 FX_BOOL» » » » Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice, FX_RECT* pRect, | 315 bool» » » » Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice, FX_RECT* pRect, |
| 316 const CPDF_PageObject* pObj, int max_dpi = 0)
; | 316 const CPDF_PageObject* pObj, int max_dpi = 0)
; |
| 317 void OutputToDevice(); | 317 void OutputToDevice(); |
| 318 CFX_DIBitmap* GetBitmap() const | 318 CFX_DIBitmap* GetBitmap() const |
| 319 { | 319 { |
| 320 return m_pBitmap; | 320 return m_pBitmap; |
| 321 } | 321 } |
| 322 const CFX_AffineMatrix* GetMatrix() const | 322 const CFX_AffineMatrix* GetMatrix() const |
| 323 { | 323 { |
| 324 return &m_Matrix; | 324 return &m_Matrix; |
| 325 } | 325 } |
| 326 private: | 326 private: |
| 327 CFX_RenderDevice* m_pDevice; | 327 CFX_RenderDevice* m_pDevice; |
| 328 CPDF_RenderContext* m_pContext; | 328 CPDF_RenderContext* m_pContext; |
| 329 FX_RECT m_Rect; | 329 FX_RECT m_Rect; |
| 330 const CPDF_PageObject* m_pObject; | 330 const CPDF_PageObject* m_pObject; |
| 331 CFX_DIBitmap* m_pBitmap; | 331 CFX_DIBitmap* m_pBitmap; |
| 332 CFX_AffineMatrix m_Matrix; | 332 CFX_AffineMatrix m_Matrix; |
| 333 }; | 333 }; |
| 334 class CPDF_ImageCache | 334 class CPDF_ImageCache |
| 335 { | 335 { |
| 336 public: | 336 public: |
| 337 CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); | 337 CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); |
| 338 ~CPDF_ImageCache(); | 338 ~CPDF_ImageCache(); |
| 339 void ClearImageData(); | 339 void ClearImageData(); |
| 340 void Reset(const CFX_DIBitmap* pBitmap); | 340 void Reset(const CFX_DIBitmap* pBitmap); |
| 341 FX_BOOL» » » » GetCachedBitmap(CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask, FX_DWORD& MatteColor, CPDF_Dictionary* pPageResources, | 341 bool» » » » GetCachedBitmap(CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask, FX_DWORD& MatteColor, CPDF_Dictionary* pPageResources, |
| 342 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFa
mily = 0, FX_BOOL bLoadMask = FALSE, | 342 bool bStdCS = false, FX_DWORD GroupFamil
y = 0, bool bLoadMask = false, |
| 343 CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0, int32_t downsampleHeight = 0); | 343 CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0, int32_t downsampleHeight = 0); |
| 344 FX_DWORD EstimateSize() const | 344 FX_DWORD EstimateSize() const |
| 345 { | 345 { |
| 346 return m_dwCacheSize; | 346 return m_dwCacheSize; |
| 347 } | 347 } |
| 348 FX_DWORD GetTimeCount() const | 348 FX_DWORD GetTimeCount() const |
| 349 { | 349 { |
| 350 return m_dwTimeCount; | 350 return m_dwTimeCount; |
| 351 } | 351 } |
| 352 CPDF_Stream* GetStream() const | 352 CPDF_Stream* GetStream() const |
| 353 { | 353 { |
| 354 return m_pStream; | 354 return m_pStream; |
| 355 } | 355 } |
| 356 void SetTimeCount(FX_DWORD dwTimeCount) | 356 void SetTimeCount(FX_DWORD dwTimeCount) |
| 357 { | 357 { |
| 358 m_dwTimeCount = dwTimeCount; | 358 m_dwTimeCount = dwTimeCount; |
| 359 } | 359 } |
| 360 int m_dwTimeCount; | 360 int m_dwTimeCount; |
| 361 public: | 361 public: |
| 362 int StartGetCachedBitmap(CPDF_Dictionary* pF
ormResources, CPDF_Dictionary* pPageResources, | 362 int StartGetCachedBitmap(CPDF_Dictionary* pF
ormResources, CPDF_Dictionary* pPageResources, |
| 363 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, | 363 bool bStdCS = false, FX_DWORD GroupFamily = 0, |
| 364 FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0, int32_t downsampleHeight = 0); | 364 bool bLoadMask = false, CPDF_RenderStatus* pRenderStatus = NULL, int
32_t downsampleWidth = 0, int32_t downsampleHeight = 0); |
| 365 int Continue(IFX_Pause* pPause); | 365 int Continue(IFX_Pause* pPause); |
| 366 int ContinueGetCachedBitmap(); | 366 int ContinueGetCachedBitmap(); |
| 367 CFX_DIBSource* DetachBitmap(); | 367 CFX_DIBSource* DetachBitmap(); |
| 368 CFX_DIBSource* DetachMask(); | 368 CFX_DIBSource* DetachMask(); |
| 369 CFX_DIBSource* m_pCurBitmap; | 369 CFX_DIBSource* m_pCurBitmap; |
| 370 CFX_DIBSource* m_pCurMask; | 370 CFX_DIBSource* m_pCurMask; |
| 371 FX_DWORD m_MatteColor; | 371 FX_DWORD m_MatteColor; |
| 372 CPDF_RenderStatus* m_pRenderStatus; | 372 CPDF_RenderStatus* m_pRenderStatus; |
| 373 protected: | 373 protected: |
| 374 CPDF_Document* m_pDocument; | 374 CPDF_Document* m_pDocument; |
| 375 CPDF_Stream* m_pStream; | 375 CPDF_Stream* m_pStream; |
| 376 CFX_DIBSource* m_pCachedBitmap; | 376 CFX_DIBSource* m_pCachedBitmap; |
| 377 CFX_DIBSource* m_pCachedMask; | 377 CFX_DIBSource* m_pCachedMask; |
| 378 FX_DWORD m_dwCacheSize; | 378 FX_DWORD m_dwCacheSize; |
| 379 void CalcSize(); | 379 void CalcSize(); |
| 380 }; | 380 }; |
| 381 typedef struct { | 381 typedef struct { |
| 382 FX_FLOAT m_DecodeMin; | 382 FX_FLOAT m_DecodeMin; |
| 383 FX_FLOAT m_DecodeStep; | 383 FX_FLOAT m_DecodeStep; |
| 384 int m_ColorKeyMin; | 384 int m_ColorKeyMin; |
| 385 int m_ColorKeyMax; | 385 int m_ColorKeyMax; |
| 386 } DIB_COMP_DATA; | 386 } DIB_COMP_DATA; |
| 387 class CPDF_DIBSource : public CFX_DIBSource | 387 class CPDF_DIBSource : public CFX_DIBSource |
| 388 { | 388 { |
| 389 public: | 389 public: |
| 390 CPDF_DIBSource(); | 390 CPDF_DIBSource(); |
| 391 virtual ~CPDF_DIBSource(); | 391 virtual ~CPDF_DIBSource(); |
| 392 FX_BOOL» » » » Load(CPDF_Document* pDoc, const CPDF_Str
eam* pStream, | 392 bool» » » » Load(CPDF_Document* pDoc, const CPDF_Str
eam* pStream, |
| 393 CPDF_DIBSource** ppMask, FX_DWORD* pMatteColor, | 393 CPDF_DIBSource** ppMask, FX_DWORD* pMatteColor, |
| 394 CPDF_Dictionary* pFormResources, CPDF_Dictionary* p
PageResources, | 394 CPDF_Dictionary* pFormResources, CPDF_Dictionary* p
PageResources, |
| 395 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, F
X_BOOL bLoadMask = FALSE); | 395 bool bStdCS = false, FX_DWORD GroupFamily = 0, bool
bLoadMask = false); |
| 396 virtual FX_BOOL» » SkipToScanline(int line, IFX_Pause* pPause) cons
t; | 396 virtual bool» » SkipToScanline(int line, IFX_Pause* pPause) cons
t; |
| 397 virtual uint8_t* GetBuffer() const; | 397 virtual uint8_t* GetBuffer() const; |
| 398 virtual const uint8_t* GetScanline(int line) const; | 398 virtual const uint8_t* GetScanline(int line) const; |
| 399 virtual void DownSampleScanline(int line, uint8_t* dest_scan,
int dest_bpp, | 399 virtual void DownSampleScanline(int line, uint8_t* dest_scan,
int dest_bpp, |
| 400 int dest_width, FX_BOOL bFlipX, int c
lip_left, int clip_width) const; | 400 int dest_width, bool bFlipX, int clip
_left, int clip_width) const; |
| 401 virtual void SetDownSampleSize(int dest_width, int dest_heigh
t) const; | 401 virtual void SetDownSampleSize(int dest_width, int dest_heigh
t) const; |
| 402 CFX_DIBitmap* GetBitmap() const; | 402 CFX_DIBitmap* GetBitmap() const; |
| 403 void ReleaseBitmap(CFX_DIBitmap*) const; | 403 void ReleaseBitmap(CFX_DIBitmap*) const; |
| 404 void ClearImageData(); | 404 void ClearImageData(); |
| 405 public: | 405 public: |
| 406 int»» » » » StartLoadDIBSource(CPDF_Document* pDoc,
const CPDF_Stream* pStream, FX_BOOL bHasMask, | 406 int»» » » » StartLoadDIBSource(CPDF_Document* pDoc,
const CPDF_Stream* pStream, bool bHasMask, |
| 407 CPDF_Dictionary* pFormResources, CPDF
_Dictionary* pPageResources, | 407 CPDF_Dictionary* pFormResources, CPDF
_Dictionary* pPageResources, |
| 408 FX_BOOL bStdCS = FALSE, FX_DWORD Grou
pFamily = 0, FX_BOOL bLoadMask = FALSE); | 408 bool bStdCS = false, FX_DWORD GroupFa
mily = 0, bool bLoadMask = false); |
| 409 int ContinueLoadDIBSource(IFX_Pause* pPause)
; | 409 int ContinueLoadDIBSource(IFX_Pause* pPause)
; |
| 410 int StratLoadMask(); | 410 int StratLoadMask(); |
| 411 int StartLoadMaskDIB(); | 411 int StartLoadMaskDIB(); |
| 412 int ContinueLoadMaskDIB(IFX_Pause* pPause); | 412 int ContinueLoadMaskDIB(IFX_Pause* pPause); |
| 413 int ContinueToLoadMask(); | 413 int ContinueToLoadMask(); |
| 414 CPDF_DIBSource* DetachMask(); | 414 CPDF_DIBSource* DetachMask(); |
| 415 CPDF_DIBSource* m_pMask; | 415 CPDF_DIBSource* m_pMask; |
| 416 FX_DWORD m_MatteColor; | 416 FX_DWORD m_MatteColor; |
| 417 void* m_pJbig2Context; | 417 void* m_pJbig2Context; |
| 418 CPDF_StreamAcc* m_pGlobalStream; | 418 CPDF_StreamAcc* m_pGlobalStream; |
| 419 FX_BOOL» » » » m_bStdCS; | 419 bool» » » » m_bStdCS; |
| 420 int m_Status; | 420 int m_Status; |
| 421 CPDF_Object* m_pMaskStream; | 421 CPDF_Object* m_pMaskStream; |
| 422 FX_BOOL» » » » m_bHasMask; | 422 bool» » » » m_bHasMask; |
| 423 protected: | 423 protected: |
| 424 FX_BOOL» » » » LoadColorInfo(CPDF_Dictionary* pFormReso
urces, CPDF_Dictionary* pPageResources); | 424 bool» » » » LoadColorInfo(CPDF_Dictionary* pFormReso
urces, CPDF_Dictionary* pPageResources); |
| 425 DIB_COMP_DATA* GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode, FX_BOOL&
bColorKey); | 425 DIB_COMP_DATA* GetDecodeAndMaskArray(bool& bDefaultDecode, bool& bColor
Key); |
| 426 CPDF_DIBSource* LoadMask(FX_DWORD& MatteColor); | 426 CPDF_DIBSource* LoadMask(FX_DWORD& MatteColor); |
| 427 CPDF_DIBSource* LoadMaskDIB(CPDF_Stream* pMask); | 427 CPDF_DIBSource* LoadMaskDIB(CPDF_Stream* pMask); |
| 428 void LoadJpxBitmap(); | 428 void LoadJpxBitmap(); |
| 429 void LoadPalette(); | 429 void LoadPalette(); |
| 430 int CreateDecoder(); | 430 int CreateDecoder(); |
| 431 void TranslateScanline24bpp(uint8_t* dest_sca
n, const uint8_t* src_scan) const; | 431 void TranslateScanline24bpp(uint8_t* dest_sca
n, const uint8_t* src_scan) const; |
| 432 void ValidateDictParam(); | 432 void ValidateDictParam(); |
| 433 CPDF_Document* m_pDocument; | 433 CPDF_Document* m_pDocument; |
| 434 const CPDF_Stream* m_pStream; | 434 const CPDF_Stream* m_pStream; |
| 435 CPDF_StreamAcc* m_pStreamAcc; | 435 CPDF_StreamAcc* m_pStreamAcc; |
| 436 const CPDF_Dictionary* m_pDict; | 436 const CPDF_Dictionary* m_pDict; |
| 437 CPDF_ColorSpace* m_pColorSpace; | 437 CPDF_ColorSpace* m_pColorSpace; |
| 438 FX_DWORD m_Family; | 438 FX_DWORD m_Family; |
| 439 FX_DWORD m_bpc; | 439 FX_DWORD m_bpc; |
| 440 FX_DWORD m_bpc_orig; | 440 FX_DWORD m_bpc_orig; |
| 441 FX_DWORD m_nComponents; | 441 FX_DWORD m_nComponents; |
| 442 FX_DWORD m_GroupFamily; | 442 FX_DWORD m_GroupFamily; |
| 443 FX_BOOL» » » » m_bLoadMask; | 443 bool» » » » m_bLoadMask; |
| 444 FX_BOOL» » » » m_bDefaultDecode; | 444 bool» » » » m_bDefaultDecode; |
| 445 FX_BOOL» » » » m_bImageMask; | 445 bool» » » » m_bImageMask; |
| 446 FX_BOOL» » » » m_bDoBpcCheck; | 446 bool» » » » m_bDoBpcCheck; |
| 447 FX_BOOL» » » » m_bColorKey; | 447 bool» » » » m_bColorKey; |
| 448 DIB_COMP_DATA* m_pCompData; | 448 DIB_COMP_DATA* m_pCompData; |
| 449 uint8_t* m_pLineBuf; | 449 uint8_t* m_pLineBuf; |
| 450 uint8_t* m_pMaskedLine; | 450 uint8_t* m_pMaskedLine; |
| 451 nonstd::unique_ptr<CFX_DIBitmap> m_pCachedBitmap; | 451 nonstd::unique_ptr<CFX_DIBitmap> m_pCachedBitmap; |
| 452 ICodec_ScanlineDecoder* m_pDecoder; | 452 ICodec_ScanlineDecoder* m_pDecoder; |
| 453 }; | 453 }; |
| 454 #define FPDF_HUGE_IMAGE_SIZE 60000000 | 454 #define FPDF_HUGE_IMAGE_SIZE 60000000 |
| 455 class CPDF_DIBTransferFunc : public CFX_FilteredDIB | 455 class CPDF_DIBTransferFunc : public CFX_FilteredDIB |
| 456 { | 456 { |
| 457 public: | 457 public: |
| 458 CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc); | 458 CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc); |
| 459 virtual FXDIB_Format GetDestFormat(); | 459 virtual FXDIB_Format GetDestFormat(); |
| 460 virtual FX_ARGB* GetDestPalette() | 460 virtual FX_ARGB* GetDestPalette() |
| 461 { | 461 { |
| 462 return NULL; | 462 return NULL; |
| 463 } | 463 } |
| 464 virtual void TranslateScanline(uint8_t* dest_buf, con
st uint8_t* src_buf) const; | 464 virtual void TranslateScanline(uint8_t* dest_buf, con
st uint8_t* src_buf) const; |
| 465 virtual void TranslateDownSamples(uint8_t* dest_buf,
const uint8_t* src_buf, int pixels, int Bpp) const; | 465 virtual void TranslateDownSamples(uint8_t* dest_buf,
const uint8_t* src_buf, int pixels, int Bpp) const; |
| 466 const uint8_t* m_RampR; | 466 const uint8_t* m_RampR; |
| 467 const uint8_t* m_RampG; | 467 const uint8_t* m_RampG; |
| 468 const uint8_t* m_RampB; | 468 const uint8_t* m_RampB; |
| 469 }; | 469 }; |
| 470 struct _CPDF_UniqueKeyGen { | 470 struct _CPDF_UniqueKeyGen { |
| 471 void Generate(int count, ...); | 471 void Generate(int count, ...); |
| 472 FX_CHAR m_Key[128]; | 472 FX_CHAR m_Key[128]; |
| 473 int m_KeyLen; | 473 int m_KeyLen; |
| 474 }; | 474 }; |
| 475 | 475 |
| 476 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 476 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| OLD | NEW |