diff options
author | Nicolas Pena <npm@chromium.org> | 2017-03-31 15:39:44 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-31 20:16:52 +0000 |
commit | bdbb0bd92bfca52e574106c4ce5f93d9d34d3373 (patch) | |
tree | 9fa4af5211b7bc655d73d7410af36a3e14e3cbb6 /core/fxge/dib/cfx_imagetransformer.h | |
parent | eb39cdb2efbc66e4566ba1f150cab7983362e13f (diff) | |
download | pdfium-bdbb0bd92bfca52e574106c4ce5f93d9d34d3373.tar.xz |
Split fx_dib part 3
Moved CFX_ImageRenderer, CFX_ImageTransformer to their own files.
Change-Id: Ic98403f62bea317600a933f79946a2a9bad30eeb
Reviewed-on: https://pdfium-review.googlesource.com/3551
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/dib/cfx_imagetransformer.h')
-rw-r--r-- | core/fxge/dib/cfx_imagetransformer.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/core/fxge/dib/cfx_imagetransformer.h b/core/fxge/dib/cfx_imagetransformer.h new file mode 100644 index 0000000000..0183a2fab1 --- /dev/null +++ b/core/fxge/dib/cfx_imagetransformer.h @@ -0,0 +1,47 @@ +// Copyright 2017 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_FXGE_DIB_CFX_IMAGETRANSFORMER_H_ +#define CORE_FXGE_DIB_CFX_IMAGETRANSFORMER_H_ + +#include <memory> + +#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxge/dib/cfx_dibitmap.h" +#include "core/fxge/dib/cfx_dibsource.h" +#include "core/fxge/dib/dib_int.h" + +class CFX_ImageStretcher; + +class CFX_ImageTransformer { + public: + CFX_ImageTransformer(const CFX_RetainPtr<CFX_DIBSource>& pSrc, + const CFX_Matrix* pMatrix, + int flags, + const FX_RECT* pClip); + ~CFX_ImageTransformer(); + + bool Start(); + bool Continue(IFX_Pause* pPause); + + const FX_RECT& result() const { return m_result; } + CFX_RetainPtr<CFX_DIBitmap> DetachBitmap(); + + private: + const CFX_RetainPtr<CFX_DIBSource> m_pSrc; + const CFX_Matrix* const m_pMatrix; + const FX_RECT* const m_pClip; + FX_RECT m_StretchClip; + FX_RECT m_result; + CFX_Matrix m_dest2stretch; + std::unique_ptr<CFX_ImageStretcher> m_Stretcher; + CFX_BitmapStorer m_Storer; + const uint32_t m_Flags; + int m_Status; +}; + +#endif // CORE_FXGE_DIB_CFX_IMAGETRANSFORMER_H_ |