| 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 23 matching lines...) Expand all  Loading... | 
| 34 | 34 | 
| 35   int m_TopBlue[TYPE3_MAX_BLUES], m_BottomBlue[TYPE3_MAX_BLUES]; | 35   int m_TopBlue[TYPE3_MAX_BLUES], m_BottomBlue[TYPE3_MAX_BLUES]; | 
| 36   int m_TopBlueCount, m_BottomBlueCount; | 36   int m_TopBlueCount, m_BottomBlueCount; | 
| 37 }; | 37 }; | 
| 38 class CPDF_Type3Cache { | 38 class CPDF_Type3Cache { | 
| 39  public: | 39  public: | 
| 40   explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} | 40   explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} | 
| 41   ~CPDF_Type3Cache(); | 41   ~CPDF_Type3Cache(); | 
| 42 | 42 | 
| 43   CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, | 43   CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, | 
| 44                              const CFX_AffineMatrix* pMatrix, | 44                              const CFX_Matrix* pMatrix, | 
| 45                              FX_FLOAT retinaScaleX = 1.0f, | 45                              FX_FLOAT retinaScaleX = 1.0f, | 
| 46                              FX_FLOAT retinaScaleY = 1.0f); | 46                              FX_FLOAT retinaScaleY = 1.0f); | 
| 47 | 47 | 
| 48  protected: | 48  protected: | 
| 49   CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, | 49   CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, | 
| 50                                FX_DWORD charcode, | 50                                FX_DWORD charcode, | 
| 51                                const CFX_AffineMatrix* pMatrix, | 51                                const CFX_Matrix* pMatrix, | 
| 52                                FX_FLOAT retinaScaleX = 1.0f, | 52                                FX_FLOAT retinaScaleX = 1.0f, | 
| 53                                FX_FLOAT retinaScaleY = 1.0f); | 53                                FX_FLOAT retinaScaleY = 1.0f); | 
| 54   CPDF_Type3Font* const m_pFont; | 54   CPDF_Type3Font* const m_pFont; | 
| 55   std::map<CFX_ByteString, CPDF_Type3Glyphs*> m_SizeMap; | 55   std::map<CFX_ByteString, CPDF_Type3Glyphs*> m_SizeMap; | 
| 56 }; | 56 }; | 
| 57 | 57 | 
| 58 class CPDF_TransferFunc { | 58 class CPDF_TransferFunc { | 
| 59  public: | 59  public: | 
| 60   explicit CPDF_TransferFunc(CPDF_Document* pDoc); | 60   explicit CPDF_TransferFunc(CPDF_Document* pDoc); | 
| 61 | 61 | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 86       std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*>; | 86       std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*>; | 
| 87 | 87 | 
| 88   CPDF_Document* m_pPDFDoc; | 88   CPDF_Document* m_pPDFDoc; | 
| 89   CFX_FontCache* m_pFontCache; | 89   CFX_FontCache* m_pFontCache; | 
| 90   CPDF_Type3CacheMap m_Type3FaceMap; | 90   CPDF_Type3CacheMap m_Type3FaceMap; | 
| 91   CPDF_TransferFuncMap m_TransferFuncMap; | 91   CPDF_TransferFuncMap m_TransferFuncMap; | 
| 92 }; | 92 }; | 
| 93 struct _PDF_RenderItem { | 93 struct _PDF_RenderItem { | 
| 94  public: | 94  public: | 
| 95   CPDF_PageObjects* m_pObjectList; | 95   CPDF_PageObjects* m_pObjectList; | 
| 96   CFX_AffineMatrix m_Matrix; | 96   CFX_Matrix m_Matrix; | 
| 97 }; | 97 }; | 
| 98 | 98 | 
| 99 typedef CFX_ArrayTemplate<_PDF_RenderItem> CPDF_RenderLayer; | 99 typedef CFX_ArrayTemplate<_PDF_RenderItem> CPDF_RenderLayer; | 
| 100 | 100 | 
| 101 class IPDF_ObjectRenderer { | 101 class IPDF_ObjectRenderer { | 
| 102  public: | 102  public: | 
| 103   static IPDF_ObjectRenderer* Create(int type); | 103   static IPDF_ObjectRenderer* Create(int type); | 
| 104   virtual ~IPDF_ObjectRenderer() {} | 104   virtual ~IPDF_ObjectRenderer() {} | 
| 105   virtual FX_BOOL Start(CPDF_RenderStatus* pRenderStatus, | 105   virtual FX_BOOL Start(CPDF_RenderStatus* pRenderStatus, | 
| 106                         const CPDF_PageObject* pObj, | 106                         const CPDF_PageObject* pObj, | 
| 107                         const CFX_AffineMatrix* pObj2Device, | 107                         const CFX_Matrix* pObj2Device, | 
| 108                         FX_BOOL bStdCS, | 108                         FX_BOOL bStdCS, | 
| 109                         int blendType = FXDIB_BLEND_NORMAL) = 0; | 109                         int blendType = FXDIB_BLEND_NORMAL) = 0; | 
| 110   virtual FX_BOOL Continue(IFX_Pause* pPause) = 0; | 110   virtual FX_BOOL Continue(IFX_Pause* pPause) = 0; | 
| 111   FX_BOOL m_Result; | 111   FX_BOOL m_Result; | 
| 112 }; | 112 }; | 
| 113 | 113 | 
| 114 class CPDF_RenderStatus { | 114 class CPDF_RenderStatus { | 
| 115  public: | 115  public: | 
| 116   CPDF_RenderStatus(); | 116   CPDF_RenderStatus(); | 
| 117   ~CPDF_RenderStatus(); | 117   ~CPDF_RenderStatus(); | 
| 118   FX_BOOL Initialize(class CPDF_RenderContext* pContext, | 118   FX_BOOL Initialize(class CPDF_RenderContext* pContext, | 
| 119                      CFX_RenderDevice* pDevice, | 119                      CFX_RenderDevice* pDevice, | 
| 120                      const CFX_AffineMatrix* pDeviceMatrix, | 120                      const CFX_Matrix* pDeviceMatrix, | 
| 121                      const CPDF_PageObject* pStopObj, | 121                      const CPDF_PageObject* pStopObj, | 
| 122                      const CPDF_RenderStatus* pParentStatus, | 122                      const CPDF_RenderStatus* pParentStatus, | 
| 123                      const CPDF_GraphicStates* pInitialStates, | 123                      const CPDF_GraphicStates* pInitialStates, | 
| 124                      const CPDF_RenderOptions* pOptions, | 124                      const CPDF_RenderOptions* pOptions, | 
| 125                      int transparency, | 125                      int transparency, | 
| 126                      FX_BOOL bDropObjects, | 126                      FX_BOOL bDropObjects, | 
| 127                      CPDF_Dictionary* pFormResource = NULL, | 127                      CPDF_Dictionary* pFormResource = NULL, | 
| 128                      FX_BOOL bStdCS = FALSE, | 128                      FX_BOOL bStdCS = FALSE, | 
| 129                      CPDF_Type3Char* pType3Char = NULL, | 129                      CPDF_Type3Char* pType3Char = NULL, | 
| 130                      FX_ARGB fill_color = 0, | 130                      FX_ARGB fill_color = 0, | 
| 131                      FX_DWORD GroupFamily = 0, | 131                      FX_DWORD GroupFamily = 0, | 
| 132                      FX_BOOL bLoadMask = FALSE); | 132                      FX_BOOL bLoadMask = FALSE); | 
| 133   void RenderObjectList(const CPDF_PageObjects* pObjs, | 133   void RenderObjectList(const CPDF_PageObjects* pObjs, | 
| 134                         const CFX_AffineMatrix* pObj2Device); | 134                         const CFX_Matrix* pObj2Device); | 
| 135   void RenderSingleObject(const CPDF_PageObject* pObj, | 135   void RenderSingleObject(const CPDF_PageObject* pObj, | 
| 136                           const CFX_AffineMatrix* pObj2Device); | 136                           const CFX_Matrix* pObj2Device); | 
| 137   FX_BOOL ContinueSingleObject(const CPDF_PageObject* pObj, | 137   FX_BOOL ContinueSingleObject(const CPDF_PageObject* pObj, | 
| 138                                const CFX_AffineMatrix* pObj2Device, | 138                                const CFX_Matrix* pObj2Device, | 
| 139                                IFX_Pause* pPause); | 139                                IFX_Pause* pPause); | 
| 140   CPDF_RenderContext* GetContext() { return m_pContext; } | 140   CPDF_RenderContext* GetContext() { return m_pContext; } | 
| 141 | 141 | 
| 142   CPDF_RenderOptions m_Options; | 142   CPDF_RenderOptions m_Options; | 
| 143   CPDF_Dictionary* m_pFormResource; | 143   CPDF_Dictionary* m_pFormResource; | 
| 144   CPDF_Dictionary* m_pPageResource; | 144   CPDF_Dictionary* m_pPageResource; | 
| 145   CFX_ArrayTemplate<CPDF_Type3Font*> m_Type3FontCache; | 145   CFX_ArrayTemplate<CPDF_Type3Font*> m_Type3FontCache; | 
| 146 | 146 | 
| 147  protected: | 147  protected: | 
| 148   friend class CPDF_ImageRenderer; | 148   friend class CPDF_ImageRenderer; | 
| 149   friend class CPDF_RenderContext; | 149   friend class CPDF_RenderContext; | 
| 150   void ProcessClipPath(CPDF_ClipPath ClipPath, | 150   void ProcessClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device); | 
| 151                        const CFX_AffineMatrix* pObj2Device); | 151   void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device); | 
| 152   void DrawClipPath(CPDF_ClipPath ClipPath, |  | 
| 153                     const CFX_AffineMatrix* pObj2Device); |  | 
| 154   FX_BOOL ProcessTransparency(const CPDF_PageObject* PageObj, | 152   FX_BOOL ProcessTransparency(const CPDF_PageObject* PageObj, | 
| 155                               const CFX_AffineMatrix* pObj2Device); | 153                               const CFX_Matrix* pObj2Device); | 
| 156   void ProcessObjectNoClip(const CPDF_PageObject* PageObj, | 154   void ProcessObjectNoClip(const CPDF_PageObject* PageObj, | 
| 157                            const CFX_AffineMatrix* pObj2Device); | 155                            const CFX_Matrix* pObj2Device); | 
| 158   void DrawObjWithBackground(const CPDF_PageObject* pObj, | 156   void DrawObjWithBackground(const CPDF_PageObject* pObj, | 
| 159                              const CFX_AffineMatrix* pObj2Device); | 157                              const CFX_Matrix* pObj2Device); | 
| 160   FX_BOOL DrawObjWithBlend(const CPDF_PageObject* pObj, | 158   FX_BOOL DrawObjWithBlend(const CPDF_PageObject* pObj, | 
| 161                            const CFX_AffineMatrix* pObj2Device); | 159                            const CFX_Matrix* pObj2Device); | 
| 162   FX_BOOL ProcessPath(CPDF_PathObject* pPathObj, | 160   FX_BOOL ProcessPath(CPDF_PathObject* pPathObj, const CFX_Matrix* pObj2Device); | 
| 163                       const CFX_AffineMatrix* pObj2Device); |  | 
| 164   void ProcessPathPattern(CPDF_PathObject* pPathObj, | 161   void ProcessPathPattern(CPDF_PathObject* pPathObj, | 
| 165                           const CFX_AffineMatrix* pObj2Device, | 162                           const CFX_Matrix* pObj2Device, | 
| 166                           int& filltype, | 163                           int& filltype, | 
| 167                           FX_BOOL& bStroke); | 164                           FX_BOOL& bStroke); | 
| 168   void DrawPathWithPattern(CPDF_PathObject* pPathObj, | 165   void DrawPathWithPattern(CPDF_PathObject* pPathObj, | 
| 169                            const CFX_AffineMatrix* pObj2Device, | 166                            const CFX_Matrix* pObj2Device, | 
| 170                            CPDF_Color* pColor, | 167                            CPDF_Color* pColor, | 
| 171                            FX_BOOL bStroke); | 168                            FX_BOOL bStroke); | 
| 172   void DrawTilingPattern(CPDF_TilingPattern* pPattern, | 169   void DrawTilingPattern(CPDF_TilingPattern* pPattern, | 
| 173                          CPDF_PageObject* pPageObj, | 170                          CPDF_PageObject* pPageObj, | 
| 174                          const CFX_AffineMatrix* pObj2Device, | 171                          const CFX_Matrix* pObj2Device, | 
| 175                          FX_BOOL bStroke); | 172                          FX_BOOL bStroke); | 
| 176   void DrawShadingPattern(CPDF_ShadingPattern* pPattern, | 173   void DrawShadingPattern(CPDF_ShadingPattern* pPattern, | 
| 177                           CPDF_PageObject* pPageObj, | 174                           CPDF_PageObject* pPageObj, | 
| 178                           const CFX_AffineMatrix* pObj2Device, | 175                           const CFX_Matrix* pObj2Device, | 
| 179                           FX_BOOL bStroke); | 176                           FX_BOOL bStroke); | 
| 180   FX_BOOL SelectClipPath(CPDF_PathObject* pPathObj, | 177   FX_BOOL SelectClipPath(CPDF_PathObject* pPathObj, | 
| 181                          const CFX_AffineMatrix* pObj2Device, | 178                          const CFX_Matrix* pObj2Device, | 
| 182                          FX_BOOL bStroke); | 179                          FX_BOOL bStroke); | 
| 183   FX_BOOL ProcessImage(CPDF_ImageObject* pImageObj, | 180   FX_BOOL ProcessImage(CPDF_ImageObject* pImageObj, | 
| 184                        const CFX_AffineMatrix* pObj2Device); | 181                        const CFX_Matrix* pObj2Device); | 
| 185   FX_BOOL OutputBitmapAlpha(CPDF_ImageObject* pImageObj, | 182   FX_BOOL OutputBitmapAlpha(CPDF_ImageObject* pImageObj, | 
| 186                             const CFX_AffineMatrix* pImage2Device); | 183                             const CFX_Matrix* pImage2Device); | 
| 187   FX_BOOL OutputImage(CPDF_ImageObject* pImageObj, | 184   FX_BOOL OutputImage(CPDF_ImageObject* pImageObj, | 
| 188                       const CFX_AffineMatrix* pImage2Device); | 185                       const CFX_Matrix* pImage2Device); | 
| 189   FX_BOOL OutputDIBSource(const CFX_DIBSource* pOutputBitmap, | 186   FX_BOOL OutputDIBSource(const CFX_DIBSource* pOutputBitmap, | 
| 190                           FX_ARGB fill_argb, | 187                           FX_ARGB fill_argb, | 
| 191                           int bitmap_alpha, | 188                           int bitmap_alpha, | 
| 192                           const CFX_AffineMatrix* pImage2Device, | 189                           const CFX_Matrix* pImage2Device, | 
| 193                           CPDF_ImageCache* pImageCache, | 190                           CPDF_ImageCache* pImageCache, | 
| 194                           FX_DWORD flags); | 191                           FX_DWORD flags); | 
| 195   void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, | 192   void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, | 
| 196                          int left, | 193                          int left, | 
| 197                          int top, | 194                          int top, | 
| 198                          FX_ARGB mask_argb, | 195                          FX_ARGB mask_argb, | 
| 199                          int bitmap_alpha, | 196                          int bitmap_alpha, | 
| 200                          int blend_mode, | 197                          int blend_mode, | 
| 201                          int bIsolated); | 198                          int bIsolated); | 
| 202   FX_BOOL ProcessShading(CPDF_ShadingObject* pShadingObj, | 199   FX_BOOL ProcessShading(CPDF_ShadingObject* pShadingObj, | 
| 203                          const CFX_AffineMatrix* pObj2Device); | 200                          const CFX_Matrix* pObj2Device); | 
| 204   void DrawShading(CPDF_ShadingPattern* pPattern, | 201   void DrawShading(CPDF_ShadingPattern* pPattern, | 
| 205                    CFX_AffineMatrix* pMatrix, | 202                    CFX_Matrix* pMatrix, | 
| 206                    FX_RECT& clip_rect, | 203                    FX_RECT& clip_rect, | 
| 207                    int alpha, | 204                    int alpha, | 
| 208                    FX_BOOL bAlphaMode); | 205                    FX_BOOL bAlphaMode); | 
| 209   FX_BOOL ProcessType3Text(const CPDF_TextObject* textobj, | 206   FX_BOOL ProcessType3Text(const CPDF_TextObject* textobj, | 
| 210                            const CFX_AffineMatrix* pObj2Device); | 207                            const CFX_Matrix* pObj2Device); | 
| 211   FX_BOOL ProcessText(const CPDF_TextObject* textobj, | 208   FX_BOOL ProcessText(const CPDF_TextObject* textobj, | 
| 212                       const CFX_AffineMatrix* pObj2Device, | 209                       const CFX_Matrix* pObj2Device, | 
| 213                       CFX_PathData* pClippingPath); | 210                       CFX_PathData* pClippingPath); | 
| 214   void DrawTextPathWithPattern(const CPDF_TextObject* textobj, | 211   void DrawTextPathWithPattern(const CPDF_TextObject* textobj, | 
| 215                                const CFX_AffineMatrix* pObj2Device, | 212                                const CFX_Matrix* pObj2Device, | 
| 216                                CPDF_Font* pFont, | 213                                CPDF_Font* pFont, | 
| 217                                FX_FLOAT font_size, | 214                                FX_FLOAT font_size, | 
| 218                                const CFX_AffineMatrix* pTextMatrix, | 215                                const CFX_Matrix* pTextMatrix, | 
| 219                                FX_BOOL bFill, | 216                                FX_BOOL bFill, | 
| 220                                FX_BOOL bStroke); | 217                                FX_BOOL bStroke); | 
| 221   FX_BOOL ProcessForm(CPDF_FormObject* pFormObj, | 218   FX_BOOL ProcessForm(CPDF_FormObject* pFormObj, const CFX_Matrix* pObj2Device); | 
| 222                       const CFX_AffineMatrix* pObj2Device); |  | 
| 223   CFX_DIBitmap* GetBackdrop(const CPDF_PageObject* pObj, | 219   CFX_DIBitmap* GetBackdrop(const CPDF_PageObject* pObj, | 
| 224                             const FX_RECT& rect, | 220                             const FX_RECT& rect, | 
| 225                             int& left, | 221                             int& left, | 
| 226                             int& top, | 222                             int& top, | 
| 227                             FX_BOOL bBackAlphaRequired); | 223                             FX_BOOL bBackAlphaRequired); | 
| 228   CFX_DIBitmap* LoadSMask(CPDF_Dictionary* pSMaskDict, | 224   CFX_DIBitmap* LoadSMask(CPDF_Dictionary* pSMaskDict, | 
| 229                           FX_RECT* pClipRect, | 225                           FX_RECT* pClipRect, | 
| 230                           const CFX_AffineMatrix* pMatrix); | 226                           const CFX_Matrix* pMatrix); | 
| 231   void Init(CPDF_RenderContext* pParent); | 227   void Init(CPDF_RenderContext* pParent); | 
| 232   static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); | 228   static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); | 
| 233   static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj, | 229   static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj, | 
| 234                                             FX_BOOL bStroke); | 230                                             FX_BOOL bStroke); | 
| 235   CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObject) const; | 231   CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObject) const; | 
| 236   FX_ARGB GetFillArgb(const CPDF_PageObject* pObj, | 232   FX_ARGB GetFillArgb(const CPDF_PageObject* pObj, | 
| 237                       FX_BOOL bType3 = FALSE) const; | 233                       FX_BOOL bType3 = FALSE) const; | 
| 238   FX_ARGB GetStrokeArgb(const CPDF_PageObject* pObj) const; | 234   FX_ARGB GetStrokeArgb(const CPDF_PageObject* pObj) const; | 
| 239   CPDF_RenderContext* m_pContext; | 235   CPDF_RenderContext* m_pContext; | 
| 240   FX_BOOL m_bStopped; | 236   FX_BOOL m_bStopped; | 
| 241   void DitherObjectArea(const CPDF_PageObject* pObj, | 237   void DitherObjectArea(const CPDF_PageObject* pObj, | 
| 242                         const CFX_AffineMatrix* pObj2Device); | 238                         const CFX_Matrix* pObj2Device); | 
| 243   FX_BOOL GetObjectClippedRect(const CPDF_PageObject* pObj, | 239   FX_BOOL GetObjectClippedRect(const CPDF_PageObject* pObj, | 
| 244                                const CFX_AffineMatrix* pObj2Device, | 240                                const CFX_Matrix* pObj2Device, | 
| 245                                FX_BOOL bLogical, | 241                                FX_BOOL bLogical, | 
| 246                                FX_RECT& rect) const; | 242                                FX_RECT& rect) const; | 
| 247   void GetScaledMatrix(CFX_Matrix& matrix) const; | 243   void GetScaledMatrix(CFX_Matrix& matrix) const; | 
| 248 | 244 | 
| 249  protected: | 245  protected: | 
| 250   static const int kRenderMaxRecursionDepth = 64; | 246   static const int kRenderMaxRecursionDepth = 64; | 
| 251   static int s_CurrentRecursionDepth; | 247   static int s_CurrentRecursionDepth; | 
| 252 | 248 | 
| 253   CFX_RenderDevice* m_pDevice; | 249   CFX_RenderDevice* m_pDevice; | 
| 254   CFX_AffineMatrix m_DeviceMatrix; | 250   CFX_Matrix m_DeviceMatrix; | 
| 255   CPDF_ClipPath m_LastClipPath; | 251   CPDF_ClipPath m_LastClipPath; | 
| 256   const CPDF_PageObject* m_pCurObj; | 252   const CPDF_PageObject* m_pCurObj; | 
| 257   const CPDF_PageObject* m_pStopObj; | 253   const CPDF_PageObject* m_pStopObj; | 
| 258   CPDF_GraphicStates m_InitialStates; | 254   CPDF_GraphicStates m_InitialStates; | 
| 259   int m_HalftoneLimit; | 255   int m_HalftoneLimit; | 
| 260   nonstd::unique_ptr<IPDF_ObjectRenderer> m_pObjectRenderer; | 256   nonstd::unique_ptr<IPDF_ObjectRenderer> m_pObjectRenderer; | 
| 261   FX_BOOL m_bPrint; | 257   FX_BOOL m_bPrint; | 
| 262   int m_Transparency; | 258   int m_Transparency; | 
| 263   int m_DitherBits; | 259   int m_DitherBits; | 
| 264   FX_BOOL m_bDropObjects; | 260   FX_BOOL m_bDropObjects; | 
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 333 class CFX_ImageTransformer; | 329 class CFX_ImageTransformer; | 
| 334 | 330 | 
| 335 class CPDF_ImageRenderer : public IPDF_ObjectRenderer { | 331 class CPDF_ImageRenderer : public IPDF_ObjectRenderer { | 
| 336  public: | 332  public: | 
| 337   CPDF_ImageRenderer(); | 333   CPDF_ImageRenderer(); | 
| 338   ~CPDF_ImageRenderer() override; | 334   ~CPDF_ImageRenderer() override; | 
| 339 | 335 | 
| 340   // IPDF_ObjectRenderer | 336   // IPDF_ObjectRenderer | 
| 341   FX_BOOL Start(CPDF_RenderStatus* pStatus, | 337   FX_BOOL Start(CPDF_RenderStatus* pStatus, | 
| 342                 const CPDF_PageObject* pObj, | 338                 const CPDF_PageObject* pObj, | 
| 343                 const CFX_AffineMatrix* pObj2Device, | 339                 const CFX_Matrix* pObj2Device, | 
| 344                 FX_BOOL bStdCS, | 340                 FX_BOOL bStdCS, | 
| 345                 int blendType = FXDIB_BLEND_NORMAL) override; | 341                 int blendType = FXDIB_BLEND_NORMAL) override; | 
| 346   FX_BOOL Continue(IFX_Pause* pPause) override; | 342   FX_BOOL Continue(IFX_Pause* pPause) override; | 
| 347 | 343 | 
| 348   FX_BOOL Start(CPDF_RenderStatus* pStatus, | 344   FX_BOOL Start(CPDF_RenderStatus* pStatus, | 
| 349                 const CFX_DIBSource* pDIBSource, | 345                 const CFX_DIBSource* pDIBSource, | 
| 350                 FX_ARGB bitmap_argb, | 346                 FX_ARGB bitmap_argb, | 
| 351                 int bitmap_alpha, | 347                 int bitmap_alpha, | 
| 352                 const CFX_AffineMatrix* pImage2Device, | 348                 const CFX_Matrix* pImage2Device, | 
| 353                 FX_DWORD flags, | 349                 FX_DWORD flags, | 
| 354                 FX_BOOL bStdCS, | 350                 FX_BOOL bStdCS, | 
| 355                 int blendType = FXDIB_BLEND_NORMAL); | 351                 int blendType = FXDIB_BLEND_NORMAL); | 
| 356 | 352 | 
| 357  protected: | 353  protected: | 
| 358   CPDF_RenderStatus* m_pRenderStatus; | 354   CPDF_RenderStatus* m_pRenderStatus; | 
| 359   CPDF_ImageObject* m_pImageObject; | 355   CPDF_ImageObject* m_pImageObject; | 
| 360   int m_Status; | 356   int m_Status; | 
| 361   const CFX_AffineMatrix* m_pObj2Device; | 357   const CFX_Matrix* m_pObj2Device; | 
| 362   CFX_AffineMatrix m_ImageMatrix; | 358   CFX_Matrix m_ImageMatrix; | 
| 363   CPDF_ImageLoader m_Loader; | 359   CPDF_ImageLoader m_Loader; | 
| 364   const CFX_DIBSource* m_pDIBSource; | 360   const CFX_DIBSource* m_pDIBSource; | 
| 365   CFX_DIBitmap* m_pClone; | 361   CFX_DIBitmap* m_pClone; | 
| 366   int m_BitmapAlpha; | 362   int m_BitmapAlpha; | 
| 367   FX_BOOL m_bPatternColor; | 363   FX_BOOL m_bPatternColor; | 
| 368   CPDF_Pattern* m_pPattern; | 364   CPDF_Pattern* m_pPattern; | 
| 369   FX_ARGB m_FillArgb; | 365   FX_ARGB m_FillArgb; | 
| 370   FX_DWORD m_Flags; | 366   FX_DWORD m_Flags; | 
| 371   CPDF_QuickStretcher* m_pQuickStretcher; | 367   CPDF_QuickStretcher* m_pQuickStretcher; | 
| 372   CFX_ImageTransformer* m_pTransformer; | 368   CFX_ImageTransformer* m_pTransformer; | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
| 389 | 385 | 
| 390   FX_BOOL Initialize(CPDF_RenderContext* pContext, | 386   FX_BOOL Initialize(CPDF_RenderContext* pContext, | 
| 391                      CFX_RenderDevice* pDevice, | 387                      CFX_RenderDevice* pDevice, | 
| 392                      FX_RECT* pRect, | 388                      FX_RECT* pRect, | 
| 393                      const CPDF_PageObject* pObj, | 389                      const CPDF_PageObject* pObj, | 
| 394                      const CPDF_RenderOptions* pOptions = NULL, | 390                      const CPDF_RenderOptions* pOptions = NULL, | 
| 395                      int max_dpi = 0); | 391                      int max_dpi = 0); | 
| 396   CFX_RenderDevice* GetDevice() { | 392   CFX_RenderDevice* GetDevice() { | 
| 397     return m_pBitmapDevice ? m_pBitmapDevice.get() : m_pDevice; | 393     return m_pBitmapDevice ? m_pBitmapDevice.get() : m_pDevice; | 
| 398   } | 394   } | 
| 399   CFX_AffineMatrix* GetMatrix() { return &m_Matrix; } | 395   CFX_Matrix* GetMatrix() { return &m_Matrix; } | 
| 400   void OutputToDevice(); | 396   void OutputToDevice(); | 
| 401 | 397 | 
| 402  private: | 398  private: | 
| 403   CFX_RenderDevice* m_pDevice; | 399   CFX_RenderDevice* m_pDevice; | 
| 404   CPDF_RenderContext* m_pContext; | 400   CPDF_RenderContext* m_pContext; | 
| 405   FX_RECT m_Rect; | 401   FX_RECT m_Rect; | 
| 406   const CPDF_PageObject* m_pObject; | 402   const CPDF_PageObject* m_pObject; | 
| 407   nonstd::unique_ptr<CFX_FxgeDevice> m_pBitmapDevice; | 403   nonstd::unique_ptr<CFX_FxgeDevice> m_pBitmapDevice; | 
| 408   CFX_AffineMatrix m_Matrix; | 404   CFX_Matrix m_Matrix; | 
| 409 }; | 405 }; | 
| 410 | 406 | 
| 411 class ICodec_ScanlineDecoder; | 407 class ICodec_ScanlineDecoder; | 
| 412 class CPDF_QuickStretcher { | 408 class CPDF_QuickStretcher { | 
| 413  public: | 409  public: | 
| 414   CPDF_QuickStretcher(); | 410   CPDF_QuickStretcher(); | 
| 415   ~CPDF_QuickStretcher(); | 411   ~CPDF_QuickStretcher(); | 
| 416   FX_BOOL Start(CPDF_ImageObject* pImageObj, | 412   FX_BOOL Start(CPDF_ImageObject* pImageObj, | 
| 417                 CFX_AffineMatrix* pImage2Device, | 413                 CFX_Matrix* pImage2Device, | 
| 418                 const FX_RECT* pClipBox); | 414                 const FX_RECT* pClipBox); | 
| 419   FX_BOOL Continue(IFX_Pause* pPause); | 415   FX_BOOL Continue(IFX_Pause* pPause); | 
| 420   CFX_DIBitmap* m_pBitmap; | 416   CFX_DIBitmap* m_pBitmap; | 
| 421   int m_ResultLeft, m_ResultTop, m_ClipLeft, m_ClipTop; | 417   int m_ResultLeft, m_ResultTop, m_ClipLeft, m_ClipTop; | 
| 422   int m_DestWidth, m_DestHeight, m_ResultWidth, m_ResultHeight; | 418   int m_DestWidth, m_DestHeight, m_ResultWidth, m_ResultHeight; | 
| 423   int m_Bpp, m_SrcWidth, m_SrcHeight; | 419   int m_Bpp, m_SrcWidth, m_SrcHeight; | 
| 424   FX_BOOL m_bFlipX, m_bFlipY; | 420   FX_BOOL m_bFlipX, m_bFlipY; | 
| 425   CPDF_ColorSpace* m_pCS; | 421   CPDF_ColorSpace* m_pCS; | 
| 426   ICodec_ScanlineDecoder* m_pDecoder; | 422   ICodec_ScanlineDecoder* m_pDecoder; | 
| 427   CPDF_StreamAcc m_StreamAcc; | 423   CPDF_StreamAcc m_StreamAcc; | 
| 428   int m_LineIndex; | 424   int m_LineIndex; | 
| 429 }; | 425 }; | 
| 430 | 426 | 
| 431 class CPDF_DeviceBuffer { | 427 class CPDF_DeviceBuffer { | 
| 432  public: | 428  public: | 
| 433   CPDF_DeviceBuffer(); | 429   CPDF_DeviceBuffer(); | 
| 434   ~CPDF_DeviceBuffer(); | 430   ~CPDF_DeviceBuffer(); | 
| 435   FX_BOOL Initialize(CPDF_RenderContext* pContext, | 431   FX_BOOL Initialize(CPDF_RenderContext* pContext, | 
| 436                      CFX_RenderDevice* pDevice, | 432                      CFX_RenderDevice* pDevice, | 
| 437                      FX_RECT* pRect, | 433                      FX_RECT* pRect, | 
| 438                      const CPDF_PageObject* pObj, | 434                      const CPDF_PageObject* pObj, | 
| 439                      int max_dpi = 0); | 435                      int max_dpi = 0); | 
| 440   void OutputToDevice(); | 436   void OutputToDevice(); | 
| 441   CFX_DIBitmap* GetBitmap() const { return m_pBitmap.get(); } | 437   CFX_DIBitmap* GetBitmap() const { return m_pBitmap.get(); } | 
| 442   const CFX_AffineMatrix* GetMatrix() const { return &m_Matrix; } | 438   const CFX_Matrix* GetMatrix() const { return &m_Matrix; } | 
| 443 | 439 | 
| 444  private: | 440  private: | 
| 445   CFX_RenderDevice* m_pDevice; | 441   CFX_RenderDevice* m_pDevice; | 
| 446   CPDF_RenderContext* m_pContext; | 442   CPDF_RenderContext* m_pContext; | 
| 447   FX_RECT m_Rect; | 443   FX_RECT m_Rect; | 
| 448   const CPDF_PageObject* m_pObject; | 444   const CPDF_PageObject* m_pObject; | 
| 449   nonstd::unique_ptr<CFX_DIBitmap> m_pBitmap; | 445   nonstd::unique_ptr<CFX_DIBitmap> m_pBitmap; | 
| 450   CFX_AffineMatrix m_Matrix; | 446   CFX_Matrix m_Matrix; | 
| 451 }; | 447 }; | 
| 452 | 448 | 
| 453 class CPDF_ImageCache { | 449 class CPDF_ImageCache { | 
| 454  public: | 450  public: | 
| 455   CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); | 451   CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); | 
| 456   ~CPDF_ImageCache(); | 452   ~CPDF_ImageCache(); | 
| 457   void ClearImageData(); | 453   void ClearImageData(); | 
| 458   void Reset(const CFX_DIBitmap* pBitmap); | 454   void Reset(const CFX_DIBitmap* pBitmap); | 
| 459   FX_BOOL GetCachedBitmap(CFX_DIBSource*& pBitmap, | 455   FX_BOOL GetCachedBitmap(CFX_DIBSource*& pBitmap, | 
| 460                           CFX_DIBSource*& pMask, | 456                           CFX_DIBSource*& pMask, | 
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 645   const uint8_t* m_RampB; | 641   const uint8_t* m_RampB; | 
| 646 }; | 642 }; | 
| 647 | 643 | 
| 648 struct _CPDF_UniqueKeyGen { | 644 struct _CPDF_UniqueKeyGen { | 
| 649   void Generate(int count, ...); | 645   void Generate(int count, ...); | 
| 650   FX_CHAR m_Key[128]; | 646   FX_CHAR m_Key[128]; | 
| 651   int m_KeyLen; | 647   int m_KeyLen; | 
| 652 }; | 648 }; | 
| 653 | 649 | 
| 654 #endif  // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 650 #endif  // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 
| OLD | NEW | 
|---|