Merge to XFA: Fix ALL the include guards.
[pdfium.git] / core / include / fpdfapi / fpdf_render.h
index 22ba56f..714fffb 100644 (file)
-// Copyright 2014 PDFium Authors. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
\r
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
-\r
-#ifndef _FPDF_RENDER_\r
-#define _FPDF_RENDER_\r
-#ifndef _FPDF_PAGE_\r
-#include "fpdf_page.h"\r
-#endif\r
-#ifndef _FX_GE_H_\r
-#include "../fxge/fx_ge.h"\r
-#endif\r
-class CPDF_RenderContext;\r
-class CPDF_RenderOptions;\r
-class CPDF_ImageCache;\r
-class IPDF_OCContext;\r
-class CPDF_QuickStretcher;\r
-class CFX_PathData;\r
-class CFX_GraphStateData;\r
-class CFX_RenderDevice;\r
-class CPDF_TextObject;\r
-class CPDF_PathObject;\r
-class CPDF_ImageObject;\r
-class CPDF_ShadingObject;\r
-class CPDF_FormObject;\r
-class IPDF_OCContext\r
-{\r
-public:\r
-\r
-    virtual ~IPDF_OCContext() {}\r
-\r
-    virtual FX_BOOL    CheckOCGVisible(const CPDF_Dictionary* pOCG) = 0;\r
-\r
-    FX_BOOL CheckObjectVisible(const CPDF_PageObject* pObj);\r
-};\r
-#define RENDER_COLOR_NORMAL            0\r
-#define RENDER_COLOR_GRAY              1\r
-#define RENDER_COLOR_TWOCOLOR  2\r
-#define RENDER_COLOR_ALPHA             3\r
-#define RENDER_CLEARTYPE                       0x00000001\r
-#define RENDER_PRINTGRAPHICTEXT                0x00000002\r
-#define RENDER_FORCE_DOWNSAMPLE                0x00000004\r
-#define RENDER_PRINTPREVIEW                    0x00000008\r
-#define RENDER_BGR_STRIPE                      0x00000010\r
-#define RENDER_NO_NATIVETEXT           0x00000020\r
-#define RENDER_FORCE_HALFTONE          0x00000040\r
-#define RENDER_RECT_AA                         0x00000080\r
-#define RENDER_FILL_FULLCOVER          0x00000100\r
-#define RENDER_PRINTIMAGETEXT       0x00000200\r
-#define RENDER_OVERPRINT            0x00000400\r
-#define RENDER_THINLINE             0x00000800\r
-#define RENDER_NOTEXTSMOOTH                    0x10000000\r
-#define RENDER_NOPATHSMOOTH                    0x20000000\r
-#define RENDER_NOIMAGESMOOTH           0x40000000\r
-#define RENDER_LIMITEDIMAGECACHE       0x80000000\r
-class CPDF_RenderOptions : public CFX_Object\r
-{\r
-public:\r
-\r
-    CPDF_RenderOptions();\r
-\r
-    int                                m_ColorMode;\r
-\r
-    FX_COLORREF                m_BackColor;\r
-\r
-    FX_COLORREF                m_ForeColor;\r
-\r
-    FX_DWORD           m_Flags;\r
-\r
-    int                                m_Interpolation;\r
-\r
-    FX_DWORD           m_AddFlags;\r
-\r
-    IPDF_OCContext*    m_pOCContext;\r
-\r
-    FX_DWORD           m_dwLimitCacheSize;\r
-\r
-    int                                m_HalftoneLimit;\r
-\r
-    FX_ARGB                    TranslateColor(FX_ARGB argb) const;\r
-};\r
-class CPDF_RenderContext : public CFX_Object\r
-{\r
-public:\r
-\r
-    CPDF_RenderContext();\r
-\r
-    void                       Create(CPDF_Page* pPage, FX_BOOL bFirstLayer = TRUE);\r
-\r
-    void                       Create(CPDF_Document* pDoc = NULL, CPDF_PageRenderCache* pPageCache = NULL,\r
-                           CPDF_Dictionary* pPageResources = NULL, FX_BOOL bFirstLayer = TRUE);\r
-\r
-    ~CPDF_RenderContext();\r
-\r
-    void                       Clear();\r
-\r
-    void                       AppendObjectList(CPDF_PageObjects* pObjs, const CFX_AffineMatrix* pObject2Device);\r
-\r
-    void                       SetBackground(class IPDF_BackgroundDraw* pBackground);\r
-\r
-    void                       Render(CFX_RenderDevice* pDevice, const CPDF_RenderOptions* pOptions = NULL,\r
-                           const CFX_AffineMatrix* pFinalMatrix = NULL);\r
-\r
-    void                       DrawObjectList(CFX_RenderDevice* pDevice, CPDF_PageObjects* pObjs,\r
-                                   const CFX_AffineMatrix* pObject2Device, const CPDF_RenderOptions* pOptions);\r
-\r
-    void                       GetBackground(CFX_DIBitmap* pBuffer, const CPDF_PageObject* pObj,\r
-                                  const CPDF_RenderOptions* pOptions, CFX_AffineMatrix* pFinalMatrix);\r
-\r
-    CPDF_PageRenderCache*      GetPageCache() const\r
-    {\r
-        return m_pPageCache;\r
-    }\r
-\r
-\r
-\r
-    CPDF_Document*                     m_pDocument;\r
-\r
-    CPDF_Dictionary*           m_pPageResources;\r
-\r
-    CPDF_PageRenderCache*      m_pPageCache;\r
-\r
-protected:\r
-\r
-    CFX_ArrayTemplate<struct _PDF_RenderItem>  m_ContentList;\r
-\r
-    IPDF_BackgroundDraw*       m_pBackgroundDraw;\r
-\r
-    FX_BOOL                                    m_bFirstLayer;\r
-\r
-    void                       Render(CFX_RenderDevice* pDevice, const CPDF_PageObject* pStopObj,\r
-                           const CPDF_RenderOptions* pOptions, const CFX_AffineMatrix* pFinalMatrix);\r
-    friend class CPDF_RenderStatus;\r
-    friend class CPDF_ProgressiveRenderer;\r
-};\r
-class IPDF_BackgroundDraw\r
-{\r
-public:\r
-\r
-    virtual    void    OnDrawBackground(\r
-        CFX_RenderDevice* pBitmapDevice,\r
-        const CFX_AffineMatrix* pOriginal2Bitmap\r
-    ) = 0;\r
-};\r
-class CPDF_ProgressiveRenderer : public CFX_Object\r
-{\r
-public:\r
-\r
-    CPDF_ProgressiveRenderer();\r
-\r
-    ~CPDF_ProgressiveRenderer();\r
-\r
-    typedef enum {\r
-        Ready,\r
-        ToBeContinued,\r
-        Done,\r
-        Failed\r
-    } RenderStatus;\r
-\r
-    RenderStatus               GetStatus()\r
-    {\r
-        return m_Status;\r
-    }\r
-\r
-\r
-\r
-    void                               Start(CPDF_RenderContext* pContext, CFX_RenderDevice* pDevice,\r
-                              const CPDF_RenderOptions* pOptions, class IFX_Pause* pPause, FX_BOOL bDropObjects = FALSE);\r
-\r
-    void                               Continue(class IFX_Pause* pPause);\r
-\r
-\r
-    int                                        EstimateProgress();\r
-\r
-    void                               Clear();\r
-protected:\r
-\r
-    RenderStatus               m_Status;\r
-\r
-    CPDF_RenderContext*        m_pContext;\r
-\r
-    CFX_RenderDevice*  m_pDevice;\r
-\r
-    const CPDF_RenderOptions*  m_pOptions;\r
-\r
-    FX_BOOL                            m_bDropObjects;\r
-\r
-    class CPDF_RenderStatus*   m_pRenderer;\r
-\r
-    CFX_FloatRect              m_ClipRect;\r
-\r
-    FX_DWORD                   m_LayerIndex;\r
-\r
-    FX_DWORD                   m_ObjectIndex;\r
-\r
-    FX_POSITION                        m_ObjectPos;\r
-\r
-    FX_POSITION                        m_PrevLastPos;\r
-\r
-    void                               RenderStep();\r
-};\r
-class CPDF_TextRenderer : public CFX_Object\r
-{\r
-public:\r
-\r
-    static void                DrawTextString(CFX_RenderDevice* pDevice, int left, int top,\r
-                                   CPDF_Font* pFont,\r
-                                   int height,\r
-                                   const CFX_ByteString& str,\r
-                                   FX_ARGB argb);\r
-\r
-    static void                DrawTextString(CFX_RenderDevice* pDevice, FX_FLOAT origin_x, FX_FLOAT origin_y,\r
-                                   CPDF_Font* pFont,\r
-                                   FX_FLOAT font_size,\r
-                                   const CFX_AffineMatrix* matrix,\r
-                                   const CFX_ByteString& str,\r
-                                   FX_ARGB fill_argb,\r
-                                   FX_ARGB stroke_argb = 0,\r
-                                   const CFX_GraphStateData* pGraphState = NULL,\r
-                                   const CPDF_RenderOptions* pOptions = NULL\r
-                               );\r
-\r
-    static FX_BOOL     DrawTextPath(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,\r
-                                 CPDF_Font* pFont, FX_FLOAT font_size,\r
-                                 const CFX_AffineMatrix* pText2User, const CFX_AffineMatrix* pUser2Device,\r
-                                 const CFX_GraphStateData* pGraphState,\r
-                                 FX_ARGB fill_argb, FX_ARGB stroke_argb, CFX_PathData* pClippingPath, int nFlag = 0);\r
-\r
-    static FX_BOOL     DrawNormalText(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,\r
-                                   CPDF_Font* pFont, FX_FLOAT font_size, const CFX_AffineMatrix* pText2Device,\r
-                                   FX_ARGB fill_argb, const CPDF_RenderOptions* pOptions);\r
-\r
-    static FX_BOOL     DrawType3Text(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,\r
-                                  CPDF_Font* pFont, FX_FLOAT font_size, const CFX_AffineMatrix* pText2Device,\r
-                                  FX_ARGB fill_argb);\r
-};\r
-class IPDF_PageImageCache\r
-{\r
-public:\r
-\r
-    static IPDF_PageImageCache* Create();\r
-\r
-    virtual ~IPDF_PageImageCache() {}\r
-\r
-    virtual void               OutputPage(CFX_RenderDevice* pDevice, CPDF_Page* pPage,\r
-                                   int pos_x, int pos_y, int size_x, int size_y, int rotate) = 0;\r
-\r
-    virtual void               SetCacheLimit(FX_DWORD limit) = 0;\r
-};\r
-class CPDF_PageRenderCache : public CFX_Object\r
-{\r
-public:\r
-    CPDF_PageRenderCache(CPDF_Page* pPage)\r
-    {\r
-        m_pPage = pPage;\r
-        m_nTimeCount = 0;\r
-        m_nCacheSize = 0;\r
-        m_pCurImageCache = NULL;\r
-        m_bCurFindCache = FALSE;\r
-        m_pCurImageCaches = NULL;\r
-    }\r
-    ~CPDF_PageRenderCache()\r
-    {\r
-        ClearAll();\r
-    }\r
-    void                               ClearAll();\r
-    void                               ClearImageData();\r
-\r
-    FX_DWORD                   EstimateSize();\r
-    void                               CacheOptimization(FX_INT32 dwLimitCacheSize);\r
-    FX_DWORD                   GetCachedSize(CPDF_Stream* pStream) const;\r
-    FX_DWORD                   GetTimeCount() const\r
-    {\r
-        return m_nTimeCount;\r
-    }\r
-    void                               SetTimeCount(FX_DWORD dwTimeCount)\r
-    {\r
-        m_nTimeCount = dwTimeCount;\r
-    }\r
-\r
-    void                               GetCachedBitmap(CPDF_Stream* pStream, CFX_DIBSource*& pBitmap, CFX_DIBSource*& pMask, FX_DWORD& MatteColor,\r
-                                        FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE,\r
-                                        CPDF_RenderStatus* pRenderStatus = NULL, FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0);\r
-\r
-    void                               ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap* pBitmap);\r
-    void                               ClearImageCache(CPDF_Stream* pStream);\r
-    CPDF_Page*                 GetPage()\r
-    {\r
-        return m_pPage;\r
-    }\r
-    CFX_MapPtrToPtr            m_ImageCaches;\r
-public:\r
-    FX_BOOL                            StartGetCachedBitmap(CPDF_Stream* pStream, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0,\r
-            FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL,\r
-            FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0);\r
-\r
-    FX_BOOL                            Continue(IFX_Pause* pPause);\r
-    CPDF_ImageCache*   m_pCurImageCache;\r
-    CFX_PtrArray*       m_pCurImageCaches;\r
-protected:\r
-    friend class               CPDF_Page;\r
-    CPDF_Page*                 m_pPage;\r
-\r
-    FX_DWORD                   m_nTimeCount;\r
-    FX_DWORD                   m_nCacheSize;\r
-    FX_BOOL                            m_bCurFindCache;\r
-};\r
-class CPDF_RenderConfig : public CFX_Object\r
-{\r
-public:\r
-    CPDF_RenderConfig();\r
-    ~CPDF_RenderConfig();\r
-    int                                        m_HalftoneLimit;\r
-    int                                        m_RenderStepLimit;\r
-};\r
-#endif\r
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
+#define CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
+
+#include "../fxge/fx_ge.h"
+#include "fpdf_page.h"
+
+class CPDF_RenderContext;
+class CPDF_RenderOptions;
+class CPDF_ImageCache;
+class IPDF_OCContext;
+class CPDF_QuickStretcher;
+class CFX_PathData;
+class CFX_GraphStateData;
+class CFX_RenderDevice;
+class CPDF_TextObject;
+class CPDF_PathObject;
+class CPDF_ImageObject;
+class CPDF_ShadingObject;
+class CPDF_FormObject;
+class IPDF_OCContext
+{
+public:
+
+    virtual ~IPDF_OCContext() {}
+
+    virtual FX_BOOL    CheckOCGVisible(const CPDF_Dictionary* pOCG) = 0;
+
+    FX_BOOL CheckObjectVisible(const CPDF_PageObject* pObj);
+};
+#define RENDER_COLOR_NORMAL            0
+#define RENDER_COLOR_GRAY              1
+#define RENDER_COLOR_TWOCOLOR  2
+#define RENDER_COLOR_ALPHA             3
+#define RENDER_CLEARTYPE                       0x00000001
+#define RENDER_PRINTGRAPHICTEXT                0x00000002
+#define RENDER_FORCE_DOWNSAMPLE                0x00000004
+#define RENDER_PRINTPREVIEW                    0x00000008
+#define RENDER_BGR_STRIPE                      0x00000010
+#define RENDER_NO_NATIVETEXT           0x00000020
+#define RENDER_FORCE_HALFTONE          0x00000040
+#define RENDER_RECT_AA                         0x00000080
+#define RENDER_FILL_FULLCOVER          0x00000100
+#define RENDER_PRINTIMAGETEXT       0x00000200
+#define RENDER_OVERPRINT            0x00000400
+#define RENDER_THINLINE             0x00000800
+#define RENDER_NOTEXTSMOOTH                    0x10000000
+#define RENDER_NOPATHSMOOTH                    0x20000000
+#define RENDER_NOIMAGESMOOTH           0x40000000
+#define RENDER_LIMITEDIMAGECACHE       0x80000000
+class CPDF_RenderOptions 
+{
+public:
+
+    CPDF_RenderOptions();
+
+    int                                m_ColorMode;
+
+    FX_COLORREF                m_BackColor;
+
+    FX_COLORREF                m_ForeColor;
+
+    FX_DWORD           m_Flags;
+
+    int                                m_Interpolation;
+
+    FX_DWORD           m_AddFlags;
+
+    IPDF_OCContext*    m_pOCContext;
+
+    FX_DWORD           m_dwLimitCacheSize;
+
+    int                                m_HalftoneLimit;
+
+    FX_ARGB                    TranslateColor(FX_ARGB argb) const;
+};
+class CPDF_RenderContext 
+{
+public:
+
+    CPDF_RenderContext();
+
+    void                       Create(CPDF_Page* pPage, FX_BOOL bFirstLayer = TRUE);
+
+    void                       Create(CPDF_Document* pDoc = NULL, CPDF_PageRenderCache* pPageCache = NULL,
+                           CPDF_Dictionary* pPageResources = NULL, FX_BOOL bFirstLayer = TRUE);
+
+    ~CPDF_RenderContext();
+
+    void                       Clear();
+
+    void                       AppendObjectList(CPDF_PageObjects* pObjs, const CFX_AffineMatrix* pObject2Device);
+
+    void                       SetBackground(class IPDF_BackgroundDraw* pBackground);
+
+    void                       Render(CFX_RenderDevice* pDevice, const CPDF_RenderOptions* pOptions = NULL,
+                           const CFX_AffineMatrix* pFinalMatrix = NULL);
+
+    void                       DrawObjectList(CFX_RenderDevice* pDevice, CPDF_PageObjects* pObjs,
+                                   const CFX_AffineMatrix* pObject2Device, const CPDF_RenderOptions* pOptions);
+
+    void                       GetBackground(CFX_DIBitmap* pBuffer, const CPDF_PageObject* pObj,
+                                  const CPDF_RenderOptions* pOptions, CFX_AffineMatrix* pFinalMatrix);
+
+    CPDF_PageRenderCache*      GetPageCache() const
+    {
+        return m_pPageCache;
+    }
+
+
+
+    CPDF_Document*                     m_pDocument;
+
+    CPDF_Dictionary*           m_pPageResources;
+
+    CPDF_PageRenderCache*      m_pPageCache;
+
+protected:
+
+    CFX_ArrayTemplate<struct _PDF_RenderItem>  m_ContentList;
+
+    IPDF_BackgroundDraw*       m_pBackgroundDraw;
+
+    FX_BOOL                                    m_bFirstLayer;
+
+    void                       Render(CFX_RenderDevice* pDevice, const CPDF_PageObject* pStopObj,
+                           const CPDF_RenderOptions* pOptions, const CFX_AffineMatrix* pFinalMatrix);
+    friend class CPDF_RenderStatus;
+    friend class CPDF_ProgressiveRenderer;
+};
+class IPDF_BackgroundDraw
+{
+public:
+    virtual ~IPDF_BackgroundDraw() { }
+    virtual    void    OnDrawBackground(
+        CFX_RenderDevice* pBitmapDevice,
+        const CFX_AffineMatrix* pOriginal2Bitmap
+    ) = 0;
+};
+class CPDF_ProgressiveRenderer 
+{
+public:
+
+    CPDF_ProgressiveRenderer();
+
+    ~CPDF_ProgressiveRenderer();
+
+    typedef enum {
+        Ready,
+        ToBeContinued,
+        Done,
+        Failed
+    } RenderStatus;
+
+    RenderStatus               GetStatus()
+    {
+        return m_Status;
+    }
+
+
+
+    void                               Start(CPDF_RenderContext* pContext, CFX_RenderDevice* pDevice,
+                              const CPDF_RenderOptions* pOptions, class IFX_Pause* pPause, FX_BOOL bDropObjects = FALSE);
+
+    void                               Continue(class IFX_Pause* pPause);
+
+
+    int                                        EstimateProgress();
+
+    void                               Clear();
+protected:
+
+    RenderStatus               m_Status;
+
+    CPDF_RenderContext*        m_pContext;
+
+    CFX_RenderDevice*  m_pDevice;
+
+    const CPDF_RenderOptions*  m_pOptions;
+
+    FX_BOOL                            m_bDropObjects;
+
+    class CPDF_RenderStatus*   m_pRenderer;
+
+    CFX_FloatRect              m_ClipRect;
+
+    FX_DWORD                   m_LayerIndex;
+
+    FX_DWORD                   m_ObjectIndex;
+
+    FX_POSITION                        m_ObjectPos;
+
+    FX_POSITION                        m_PrevLastPos;
+
+    void                               RenderStep();
+};
+class CPDF_TextRenderer 
+{
+public:
+
+    static void                DrawTextString(CFX_RenderDevice* pDevice, int left, int top,
+                                   CPDF_Font* pFont,
+                                   int height,
+                                   const CFX_ByteString& str,
+                                   FX_ARGB argb);
+
+    static void                DrawTextString(CFX_RenderDevice* pDevice, FX_FLOAT origin_x, FX_FLOAT origin_y,
+                                   CPDF_Font* pFont,
+                                   FX_FLOAT font_size,
+                                   const CFX_AffineMatrix* matrix,
+                                   const CFX_ByteString& str,
+                                   FX_ARGB fill_argb,
+                                   FX_ARGB stroke_argb = 0,
+                                   const CFX_GraphStateData* pGraphState = NULL,
+                                   const CPDF_RenderOptions* pOptions = NULL
+                               );
+
+    static FX_BOOL     DrawTextPath(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
+                                 CPDF_Font* pFont, FX_FLOAT font_size,
+                                 const CFX_AffineMatrix* pText2User, const CFX_AffineMatrix* pUser2Device,
+                                 const CFX_GraphStateData* pGraphState,
+                                 FX_ARGB fill_argb, FX_ARGB stroke_argb, CFX_PathData* pClippingPath, int nFlag = 0);
+
+    static FX_BOOL     DrawNormalText(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
+                                   CPDF_Font* pFont, FX_FLOAT font_size, const CFX_AffineMatrix* pText2Device,
+                                   FX_ARGB fill_argb, const CPDF_RenderOptions* pOptions);
+
+    static FX_BOOL     DrawType3Text(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
+                                  CPDF_Font* pFont, FX_FLOAT font_size, const CFX_AffineMatrix* pText2Device,
+                                  FX_ARGB fill_argb);
+};
+class IPDF_PageImageCache
+{
+public:
+
+    static IPDF_PageImageCache* Create();
+
+    virtual ~IPDF_PageImageCache() {}
+
+    virtual void               OutputPage(CFX_RenderDevice* pDevice, CPDF_Page* pPage,
+                                   int pos_x, int pos_y, int size_x, int size_y, int rotate) = 0;
+
+    virtual void               SetCacheLimit(FX_DWORD limit) = 0;
+};
+class CPDF_PageRenderCache 
+{
+public:
+    CPDF_PageRenderCache(CPDF_Page* pPage)
+    {
+        m_pPage = pPage;
+        m_nTimeCount = 0;
+        m_nCacheSize = 0;
+        m_pCurImageCache = NULL;
+        m_bCurFindCache = FALSE;
+        m_pCurImageCaches = NULL;
+    }
+    ~CPDF_PageRenderCache()
+    {
+        ClearAll();
+    }
+    void                               ClearAll();
+    void                               ClearImageData();
+
+    FX_DWORD                   EstimateSize();
+    void                               CacheOptimization(FX_INT32 dwLimitCacheSize);
+    FX_DWORD                   GetCachedSize(CPDF_Stream* pStream) const;
+    FX_DWORD                   GetTimeCount() const
+    {
+        return m_nTimeCount;
+    }
+    void                               SetTimeCount(FX_DWORD dwTimeCount)
+    {
+        m_nTimeCount = dwTimeCount;
+    }
+
+    void                               GetCachedBitmap(CPDF_Stream* pStream, CFX_DIBSource*& pBitmap, CFX_DIBSource*& pMask, FX_DWORD& MatteColor,
+                                        FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE,
+                                        CPDF_RenderStatus* pRenderStatus = NULL, FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0);
+
+    void                               ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap* pBitmap);
+    void                               ClearImageCache(CPDF_Stream* pStream);
+    CPDF_Page*                 GetPage()
+    {
+        return m_pPage;
+    }
+    CFX_MapPtrToPtr            m_ImageCaches;
+public:
+    FX_BOOL                            StartGetCachedBitmap(CPDF_Stream* pStream, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0,
+            FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL,
+            FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0);
+
+    FX_BOOL                            Continue(IFX_Pause* pPause);
+    CPDF_ImageCache*   m_pCurImageCache;
+    CFX_PtrArray*       m_pCurImageCaches;
+protected:
+    friend class               CPDF_Page;
+    CPDF_Page*                 m_pPage;
+
+    FX_DWORD                   m_nTimeCount;
+    FX_DWORD                   m_nCacheSize;
+    FX_BOOL                            m_bCurFindCache;
+};
+class CPDF_RenderConfig 
+{
+public:
+    CPDF_RenderConfig();
+    ~CPDF_RenderConfig();
+    int                                        m_HalftoneLimit;
+    int                                        m_RenderStepLimit;
+};
+
+#endif  // CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_