| 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; |
| 11 #define TYPE3_MAX_BLUES 16 | 11 #define TYPE3_MAX_BLUES 16 |
| 12 class CPDF_Type3Glyphs : public CFX_Object | 12 class CPDF_Type3Glyphs |
| 13 { | 13 { |
| 14 public: | 14 public: |
| 15 CPDF_Type3Glyphs() | 15 CPDF_Type3Glyphs() |
| 16 { | 16 { |
| 17 m_GlyphMap.InitHashTable(253); | 17 m_GlyphMap.InitHashTable(253); |
| 18 m_TopBlueCount = m_BottomBlueCount = 0; | 18 m_TopBlueCount = m_BottomBlueCount = 0; |
| 19 } | 19 } |
| 20 ~CPDF_Type3Glyphs(); | 20 ~CPDF_Type3Glyphs(); |
| 21 CFX_MapPtrToPtr m_GlyphMap; | 21 CFX_MapPtrToPtr m_GlyphMap; |
| 22 void AdjustBlue(FX_FLOAT top, FX_FLOA
T bottom, int& top_line, int& bottom_line); | 22 void AdjustBlue(FX_FLOAT top, FX_FLOA
T bottom, int& top_line, int& bottom_line); |
| 23 | 23 |
| 24 int m_TopBlue[TYPE3_MAX_BLUES], m_Bo
ttomBlue[TYPE3_MAX_BLUES]; | 24 int m_TopBlue[TYPE3_MAX_BLUES], m_Bo
ttomBlue[TYPE3_MAX_BLUES]; |
| 25 int m_TopBlueCount, m_BottomBlueCoun
t; | 25 int m_TopBlueCount, m_BottomBlueCoun
t; |
| 26 }; | 26 }; |
| 27 class CFX_GlyphBitmap; | 27 class CFX_GlyphBitmap; |
| 28 class CPDF_Type3Cache : public CFX_Object | 28 class CPDF_Type3Cache |
| 29 { | 29 { |
| 30 public: | 30 public: |
| 31 CPDF_Type3Cache(CPDF_Type3Font* pFont) | 31 CPDF_Type3Cache(CPDF_Type3Font* pFont) |
| 32 { | 32 { |
| 33 m_pFont = pFont; | 33 m_pFont = pFont; |
| 34 } | 34 } |
| 35 ~CPDF_Type3Cache(); | 35 ~CPDF_Type3Cache(); |
| 36 CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, const CFX_AffineMat
rix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); | 36 CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, const CFX_AffineMat
rix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); |
| 37 protected: | 37 protected: |
| 38 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, FX_DWORD ch
arcode, const CFX_AffineMatrix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT
retinaScaleY = 1.0f); | 38 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, FX_DWORD ch
arcode, const CFX_AffineMatrix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT
retinaScaleY = 1.0f); |
| 39 CPDF_Type3Font* m_pFont; | 39 CPDF_Type3Font* m_pFont; |
| 40 CFX_MapByteStringToPtr m_SizeMap; | 40 CFX_MapByteStringToPtr m_SizeMap; |
| 41 }; | 41 }; |
| 42 class CPDF_TransferFunc : public CFX_Object | 42 class CPDF_TransferFunc |
| 43 { | 43 { |
| 44 public: | 44 public: |
| 45 CPDF_Document* m_pPDFDoc; | 45 CPDF_Document* m_pPDFDoc; |
| 46 FX_BYTE m_Samples[256 * 3]; | 46 FX_BYTE m_Samples[256 * 3]; |
| 47 FX_BOOL m_bIdentity; | 47 FX_BOOL m_bIdentity; |
| 48 | 48 |
| 49 CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, FX_BOOL bAutoD
ropSrc); | 49 CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, FX_BOOL bAutoD
ropSrc); |
| 50 FX_COLORREF TranslateColor(FX_COLORREF src); | 50 FX_COLORREF TranslateColor(FX_COLORREF src); |
| 51 }; | 51 }; |
| 52 typedef CFX_MapPtrTemplate<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache*>*> CP
DF_Type3CacheMap; | 52 typedef CFX_MapPtrTemplate<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache*>*> CP
DF_Type3CacheMap; |
| 53 typedef CFX_MapPtrTemplate<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc*>*
> CPDF_TransferFuncMap; | 53 typedef CFX_MapPtrTemplate<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc*>*
> CPDF_TransferFuncMap; |
| 54 class CPDF_DocRenderData : public CFX_Object | 54 class CPDF_DocRenderData |
| 55 { | 55 { |
| 56 public: | 56 public: |
| 57 CPDF_DocRenderData(CPDF_Document* pPDFDoc = NULL); | 57 CPDF_DocRenderData(CPDF_Document* pPDFDoc = NULL); |
| 58 ~CPDF_DocRenderData(); | 58 ~CPDF_DocRenderData(); |
| 59 FX_BOOL Initialize(); | 59 FX_BOOL Initialize(); |
| 60 CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); | 60 CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); |
| 61 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObj); | 61 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObj); |
| 62 CFX_FontCache* GetFontCache() | 62 CFX_FontCache* GetFontCache() |
| 63 { | 63 { |
| 64 return m_pFontCache; | 64 return m_pFontCache; |
| 65 } | 65 } |
| 66 void Clear(FX_BOOL bRelease = FALSE); | 66 void Clear(FX_BOOL bRelease = FALSE); |
| 67 void ReleaseCachedType3(CPDF_Type3Font* pFont
); | 67 void ReleaseCachedType3(CPDF_Type3Font* pFont
); |
| 68 void ReleaseTransferFunc(CPDF_Object* pObj); | 68 void ReleaseTransferFunc(CPDF_Object* pObj); |
| 69 private: | 69 private: |
| 70 CPDF_Document* m_pPDFDoc; | 70 CPDF_Document* m_pPDFDoc; |
| 71 CFX_FontCache* m_pFontCache; | 71 CFX_FontCache* m_pFontCache; |
| 72 CPDF_Type3CacheMap m_Type3FaceMap; | 72 CPDF_Type3CacheMap m_Type3FaceMap; |
| 73 CPDF_TransferFuncMap m_TransferFuncMap; | 73 CPDF_TransferFuncMap m_TransferFuncMap; |
| 74 }; | 74 }; |
| 75 struct _PDF_RenderItem { | 75 struct _PDF_RenderItem { |
| 76 public: | 76 public: |
| 77 CPDF_PageObjects* m_pObjectList; | 77 CPDF_PageObjects* m_pObjectList; |
| 78 CFX_AffineMatrix m_Matrix; | 78 CFX_AffineMatrix m_Matrix; |
| 79 }; | 79 }; |
| 80 typedef CFX_ArrayTemplate<_PDF_RenderItem> CPDF_RenderLayer; | 80 typedef CFX_ArrayTemplate<_PDF_RenderItem> CPDF_RenderLayer; |
| 81 class IPDF_ObjectRenderer : public CFX_Object | 81 class IPDF_ObjectRenderer |
| 82 { | 82 { |
| 83 public: | 83 public: |
| 84 static IPDF_ObjectRenderer* Create(int type); | 84 static IPDF_ObjectRenderer* Create(int type); |
| 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 |
| 91 { | 91 { |
| 92 public: | 92 public: |
| 93 CPDF_RenderStatus(); | 93 CPDF_RenderStatus(); |
| 94 ~CPDF_RenderStatus(); | 94 ~CPDF_RenderStatus(); |
| 95 FX_BOOL Initialize(class CPDF_RenderContext* pContext, C
FX_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); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 int m_Transparency; | 172 int m_Transparency; |
| 173 int m_DitherBits; | 173 int m_DitherBits; |
| 174 FX_BOOL m_bDropObjects; | 174 FX_BOOL m_bDropObjects; |
| 175 FX_BOOL m_bStdCS; | 175 FX_BOOL m_bStdCS; |
| 176 FX_DWORD m_GroupFamily; | 176 FX_DWORD m_GroupFamily; |
| 177 FX_BOOL m_bLoadMask; | 177 FX_BOOL m_bLoadMask; |
| 178 CPDF_Type3Char * m_pType3Char; | 178 CPDF_Type3Char * m_pType3Char; |
| 179 FX_ARGB m_T3FillColor; | 179 FX_ARGB m_T3FillColor; |
| 180 int m_curBlend; | 180 int m_curBlend; |
| 181 }; | 181 }; |
| 182 class CPDF_ImageLoader : public CFX_Object | 182 class CPDF_ImageLoader |
| 183 { | 183 { |
| 184 public: | 184 public: |
| 185 CPDF_ImageLoader() | 185 CPDF_ImageLoader() |
| 186 { | 186 { |
| 187 m_pBitmap = NULL; | 187 m_pBitmap = NULL; |
| 188 m_pMask = NULL; | 188 m_pMask = NULL; |
| 189 m_MatteColor = 0; | 189 m_MatteColor = 0; |
| 190 m_bCached = FALSE; | 190 m_bCached = FALSE; |
| 191 m_nDownsampleWidth = 0; | 191 m_nDownsampleWidth = 0; |
| 192 m_nDownsampleHeight = 0; | 192 m_nDownsampleHeight = 0; |
| 193 } | 193 } |
| 194 | 194 |
| 195 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); | 195 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); |
| 196 | 196 |
| 197 FX_BOOL StartLoadImage(const CPDF_ImageO
bject* pImage, CPDF_PageRenderCache* pCache, FX_LPVOID& LoadHandle, FX_BOOL bStd
CS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStat
us* pRenderStatus = NULL, FX_INT32 nDownsampleWidth = 0, FX_INT32 nDownsampleHei
ght = 0); | 197 FX_BOOL StartLoadImage(const CPDF_ImageO
bject* pImage, CPDF_PageRenderCache* pCache, FX_LPVOID& LoadHandle, FX_BOOL bStd
CS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE, CPDF_RenderStat
us* pRenderStatus = NULL, FX_INT32 nDownsampleWidth = 0, FX_INT32 nDownsampleHei
ght = 0); |
| 198 FX_BOOL Continue(FX_LPVOID LoadHandle, I
FX_Pause* pPause); | 198 FX_BOOL Continue(FX_LPVOID LoadHandle, I
FX_Pause* pPause); |
| 199 ~CPDF_ImageLoader(); | 199 ~CPDF_ImageLoader(); |
| 200 CFX_DIBSource* m_pBitmap; | 200 CFX_DIBSource* m_pBitmap; |
| 201 CFX_DIBSource* m_pMask; | 201 CFX_DIBSource* m_pMask; |
| 202 FX_DWORD m_MatteColor; | 202 FX_DWORD m_MatteColor; |
| 203 FX_BOOL m_bCached; | 203 FX_BOOL m_bCached; |
| 204 protected: | 204 protected: |
| 205 FX_INT32 m_nDownsampleWidth; | 205 FX_INT32 m_nDownsampleWidth; |
| 206 FX_INT32 m_nDownsampleHeight; | 206 FX_INT32 m_nDownsampleHeight; |
| 207 }; | 207 }; |
| 208 class CPDF_ProgressiveImageLoaderHandle : public CFX_Object | 208 class CPDF_ProgressiveImageLoaderHandle |
| 209 { | 209 { |
| 210 public: | 210 public: |
| 211 CPDF_ProgressiveImageLoaderHandle(); | 211 CPDF_ProgressiveImageLoaderHandle(); |
| 212 ~CPDF_ProgressiveImageLoaderHandle(); | 212 ~CPDF_ProgressiveImageLoaderHandle(); |
| 213 | 213 |
| 214 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, FX_INT32 nDownsampleWidth = 0, FX_INT32 nDownsampleHeight = 0); | 214 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, FX_INT32 nDownsampleWidth = 0, FX_INT32 nDownsampleHeight = 0); |
| 215 FX_BOOL Continue(IFX_Pause* pPause); | 215 FX_BOOL Continue(IFX_Pause* pPause); |
| 216 protected: | 216 protected: |
| 217 CPDF_ImageLoader* m_pImageLoader; | 217 CPDF_ImageLoader* m_pImageLoader; |
| 218 CPDF_PageRenderCache* m_pCache; | 218 CPDF_PageRenderCache* m_pCache; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 FX_LPVOID m_LoadHandle; | 251 FX_LPVOID m_LoadHandle; |
| 252 FX_BOOL m_bStdCS; | 252 FX_BOOL m_bStdCS; |
| 253 int m_BlendType; | 253 int m_BlendType; |
| 254 FX_BOOL StartBitmapAlpha(); | 254 FX_BOOL StartBitmapAlpha(); |
| 255 FX_BOOL StartDIBSource(); | 255 FX_BOOL StartDIBSource(); |
| 256 FX_BOOL StartRenderDIBSource(); | 256 FX_BOOL StartRenderDIBSource(); |
| 257 FX_BOOL StartLoadDIBSource(); | 257 FX_BOOL StartLoadDIBSource(); |
| 258 FX_BOOL DrawMaskedImage(); | 258 FX_BOOL DrawMaskedImage(); |
| 259 FX_BOOL DrawPatternImage(const CFX_Matrix* pObj2
Device); | 259 FX_BOOL DrawPatternImage(const CFX_Matrix* pObj2
Device); |
| 260 }; | 260 }; |
| 261 class CPDF_ScaledRenderBuffer : public CFX_Object | 261 class CPDF_ScaledRenderBuffer |
| 262 { | 262 { |
| 263 public: | 263 public: |
| 264 CPDF_ScaledRenderBuffer(); | 264 CPDF_ScaledRenderBuffer(); |
| 265 ~CPDF_ScaledRenderBuffer(); | 265 ~CPDF_ScaledRenderBuffer(); |
| 266 FX_BOOL Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice, FX_RECT* pRect, | 266 FX_BOOL Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice, FX_RECT* pRect, |
| 267 const CPDF_PageObject* pObj, const CPDF_Rende
rOptions *pOptions = NULL, int max_dpi = 0); | 267 const CPDF_PageObject* pObj, const CPDF_Rende
rOptions *pOptions = NULL, int max_dpi = 0); |
| 268 CFX_RenderDevice* GetDevice() | 268 CFX_RenderDevice* GetDevice() |
| 269 { | 269 { |
| 270 return m_pBitmapDevice ? m_pBitmapDevice : m_pDevice; | 270 return m_pBitmapDevice ? m_pBitmapDevice : m_pDevice; |
| 271 } | 271 } |
| 272 CFX_AffineMatrix* GetMatrix() | 272 CFX_AffineMatrix* GetMatrix() |
| 273 { | 273 { |
| 274 return &m_Matrix; | 274 return &m_Matrix; |
| 275 } | 275 } |
| 276 void OutputToDevice(); | 276 void OutputToDevice(); |
| 277 private: | 277 private: |
| 278 CFX_RenderDevice* m_pDevice; | 278 CFX_RenderDevice* m_pDevice; |
| 279 CPDF_RenderContext* m_pContext; | 279 CPDF_RenderContext* m_pContext; |
| 280 FX_RECT m_Rect; | 280 FX_RECT m_Rect; |
| 281 const CPDF_PageObject* m_pObject; | 281 const CPDF_PageObject* m_pObject; |
| 282 CFX_FxgeDevice* m_pBitmapDevice; | 282 CFX_FxgeDevice* m_pBitmapDevice; |
| 283 CFX_AffineMatrix m_Matrix; | 283 CFX_AffineMatrix m_Matrix; |
| 284 }; | 284 }; |
| 285 class ICodec_ScanlineDecoder; | 285 class ICodec_ScanlineDecoder; |
| 286 class CPDF_QuickStretcher : public CFX_Object | 286 class CPDF_QuickStretcher |
| 287 { | 287 { |
| 288 public: | 288 public: |
| 289 CPDF_QuickStretcher(); | 289 CPDF_QuickStretcher(); |
| 290 ~CPDF_QuickStretcher(); | 290 ~CPDF_QuickStretcher(); |
| 291 FX_BOOL Start(CPDF_ImageObject* pImageObj, CFX_AffineMatrix* pIm
age2Device, const FX_RECT* pClipBox); | 291 FX_BOOL Start(CPDF_ImageObject* pImageObj, CFX_AffineMatrix* pIm
age2Device, const FX_RECT* pClipBox); |
| 292 FX_BOOL Continue(IFX_Pause* pPause); | 292 FX_BOOL Continue(IFX_Pause* pPause); |
| 293 CFX_DIBitmap* m_pBitmap; | 293 CFX_DIBitmap* m_pBitmap; |
| 294 int m_ResultLeft, m_ResultTop, m_ClipLeft, m_ClipTop; | 294 int m_ResultLeft, m_ResultTop, m_ClipLeft, m_ClipTop; |
| 295 int m_DestWidth, m_DestHeight, m_ResultWidth, m_ResultHeight
; | 295 int m_DestWidth, m_DestHeight, m_ResultWidth, m_ResultHeight
; |
| 296 int m_Bpp, m_SrcWidth, m_SrcHeight; | 296 int m_Bpp, m_SrcWidth, m_SrcHeight; |
| 297 FX_BOOL m_bFlipX, m_bFlipY; | 297 FX_BOOL m_bFlipX, m_bFlipY; |
| 298 CPDF_ColorSpace* m_pCS; | 298 CPDF_ColorSpace* m_pCS; |
| 299 ICodec_ScanlineDecoder* m_pDecoder; | 299 ICodec_ScanlineDecoder* m_pDecoder; |
| 300 CPDF_StreamAcc m_StreamAcc; | 300 CPDF_StreamAcc m_StreamAcc; |
| 301 int m_LineIndex; | 301 int m_LineIndex; |
| 302 }; | 302 }; |
| 303 class CPDF_DeviceBuffer : public CFX_Object | 303 class CPDF_DeviceBuffer |
| 304 { | 304 { |
| 305 public: | 305 public: |
| 306 CPDF_DeviceBuffer(); | 306 CPDF_DeviceBuffer(); |
| 307 ~CPDF_DeviceBuffer(); | 307 ~CPDF_DeviceBuffer(); |
| 308 FX_BOOL Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice, FX_RECT* pRect, | 308 FX_BOOL Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice, FX_RECT* pRect, |
| 309 const CPDF_PageObject* pObj, int max_dpi = 0)
; | 309 const CPDF_PageObject* pObj, int max_dpi = 0)
; |
| 310 void OutputToDevice(); | 310 void OutputToDevice(); |
| 311 CFX_DIBitmap* GetBitmap() const | 311 CFX_DIBitmap* GetBitmap() const |
| 312 { | 312 { |
| 313 return m_pBitmap; | 313 return m_pBitmap; |
| 314 } | 314 } |
| 315 const CFX_AffineMatrix* GetMatrix() const | 315 const CFX_AffineMatrix* GetMatrix() const |
| 316 { | 316 { |
| 317 return &m_Matrix; | 317 return &m_Matrix; |
| 318 } | 318 } |
| 319 private: | 319 private: |
| 320 CFX_RenderDevice* m_pDevice; | 320 CFX_RenderDevice* m_pDevice; |
| 321 CPDF_RenderContext* m_pContext; | 321 CPDF_RenderContext* m_pContext; |
| 322 FX_RECT m_Rect; | 322 FX_RECT m_Rect; |
| 323 const CPDF_PageObject* m_pObject; | 323 const CPDF_PageObject* m_pObject; |
| 324 CFX_DIBitmap* m_pBitmap; | 324 CFX_DIBitmap* m_pBitmap; |
| 325 CFX_AffineMatrix m_Matrix; | 325 CFX_AffineMatrix m_Matrix; |
| 326 }; | 326 }; |
| 327 class CPDF_ImageCache : public CFX_Object | 327 class CPDF_ImageCache |
| 328 { | 328 { |
| 329 public: | 329 public: |
| 330 CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); | 330 CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); |
| 331 ~CPDF_ImageCache(); | 331 ~CPDF_ImageCache(); |
| 332 void ClearImageData(); | 332 void ClearImageData(); |
| 333 void Reset(const CFX_DIBitmap* pBitmap); | 333 void Reset(const CFX_DIBitmap* pBitmap); |
| 334 FX_BOOL GetCachedBitmap(CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask, FX_DWORD& MatteColor, CPDF_Dictionary* pPageResources, | 334 FX_BOOL GetCachedBitmap(CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask, FX_DWORD& MatteColor, CPDF_Dictionary* pPageResources, |
| 335 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFa
mily = 0, FX_BOOL bLoadMask = FALSE, | 335 FX_BOOL bStdCS = FALSE, FX_DWORD GroupFa
mily = 0, FX_BOOL bLoadMask = FALSE, |
| 336 CPDF_RenderStatus* pRenderStatus = NULL,
FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0); | 336 CPDF_RenderStatus* pRenderStatus = NULL,
FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0); |
| 337 FX_DWORD EstimateSize() const | 337 FX_DWORD EstimateSize() const |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 virtual void TranslateDownSamples(FX_LPBYTE dest_buf,
FX_LPCBYTE src_buf, int pixels, int Bpp) const; | 458 virtual void TranslateDownSamples(FX_LPBYTE dest_buf,
FX_LPCBYTE src_buf, int pixels, int Bpp) const; |
| 459 FX_LPCBYTE m_RampR; | 459 FX_LPCBYTE m_RampR; |
| 460 FX_LPCBYTE m_RampG; | 460 FX_LPCBYTE m_RampG; |
| 461 FX_LPCBYTE m_RampB; | 461 FX_LPCBYTE m_RampB; |
| 462 }; | 462 }; |
| 463 struct _CPDF_UniqueKeyGen { | 463 struct _CPDF_UniqueKeyGen { |
| 464 void Generate(int count, ...); | 464 void Generate(int count, ...); |
| 465 FX_CHAR m_Key[128]; | 465 FX_CHAR m_Key[128]; |
| 466 int m_KeyLen; | 466 int m_KeyLen; |
| 467 }; | 467 }; |
| OLD | NEW |