• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FXGE_DIB_CFX_IMAGERENDERER_H_
8 #define CORE_FXGE_DIB_CFX_IMAGERENDERER_H_
9 
10 #include <memory>
11 
12 #include "core/fxcrt/fx_coordinates.h"
13 #include "core/fxcrt/retain_ptr.h"
14 #include "core/fxcrt/unowned_ptr.h"
15 #include "core/fxge/dib/cfx_bitmapcomposer.h"
16 
17 class CFX_DIBBase;
18 class CFX_DIBitmap;
19 class CFX_ImageTransformer;
20 class CFX_ImageStretcher;
21 class PauseIndicatorIface;
22 
23 class CFX_ImageRenderer {
24  public:
25   CFX_ImageRenderer(const RetainPtr<CFX_DIBitmap>& pDevice,
26                     const CFX_ClipRgn* pClipRgn,
27                     const RetainPtr<CFX_DIBBase>& pSource,
28                     int bitmap_alpha,
29                     uint32_t mask_color,
30                     const CFX_Matrix& matrix,
31                     const FXDIB_ResampleOptions& options,
32                     bool bRgbByteOrder);
33   ~CFX_ImageRenderer();
34 
35   bool Continue(PauseIndicatorIface* pPause);
36 
37  private:
38   RetainPtr<CFX_DIBitmap> const m_pDevice;
39   UnownedPtr<const CFX_ClipRgn> const m_pClipRgn;
40   const CFX_Matrix m_Matrix;
41   std::unique_ptr<CFX_ImageTransformer> m_pTransformer;
42   std::unique_ptr<CFX_ImageStretcher> m_Stretcher;
43   CFX_BitmapComposer m_Composer;
44   FX_RECT m_ClipBox;
45   const int m_BitmapAlpha;
46   int m_Status = 0;
47   uint32_t m_MaskColor;
48   const bool m_bRgbByteOrder;
49 };
50 
51 #endif  // CORE_FXGE_DIB_CFX_IMAGERENDERER_H_
52