1 // Copyright 2018 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 XFA_FXFA_CXFA_IMAGERENDERER_H_ 8 #define XFA_FXFA_CXFA_IMAGERENDERER_H_ 9 10 #include <memory> 11 12 #include "core/fxcrt/fx_coordinates.h" 13 #include "core/fxcrt/retain_ptr.h" 14 #include "core/fxge/fx_dib.h" 15 16 class CFX_RenderDevice; 17 class CFX_DIBSource; 18 class CFX_DIBitmap; 19 class CFX_ImageTransformer; 20 class CFX_ImageRenderer; 21 22 class CXFA_ImageRenderer { 23 public: 24 CXFA_ImageRenderer(CFX_RenderDevice* pDevice, 25 const RetainPtr<CFX_DIBSource>& pDIBSource, 26 const CFX_Matrix* pImage2Device); 27 ~CXFA_ImageRenderer(); 28 29 bool Start(); 30 bool Continue(); 31 32 private: 33 void CompositeDIBitmap(const RetainPtr<CFX_DIBitmap>& pDIBitmap, 34 int left, 35 int top); 36 37 CFX_RenderDevice* m_pDevice; 38 int m_Status = 0; 39 CFX_Matrix m_ImageMatrix; 40 RetainPtr<CFX_DIBSource> m_pDIBSource; 41 RetainPtr<CFX_DIBitmap> m_pCloneConvert; 42 std::unique_ptr<CFX_ImageTransformer> m_pTransformer; 43 std::unique_ptr<CFX_ImageRenderer> m_DeviceHandle; 44 }; 45 46 #endif // XFA_FXFA_CXFA_IMAGERENDERER_H_ 47