From 0c972ebccb8c5f250122955780bd632ff5c8630f Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Mon, 3 Apr 2017 13:43:52 -0400 Subject: Split fx_dib part 5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move more classes into their own files. Change-Id: Ic505be9e406eafb378235216ea19221ce172f32e Reviewed-on: https://pdfium-review.googlesource.com/3593 Commit-Queue: Nicolás Peña Reviewed-by: dsinclair --- core/fxge/dib/cfx_imagestretcher.h | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 core/fxge/dib/cfx_imagestretcher.h (limited to 'core/fxge/dib/cfx_imagestretcher.h') diff --git a/core/fxge/dib/cfx_imagestretcher.h b/core/fxge/dib/cfx_imagestretcher.h new file mode 100644 index 0000000000..785ef9b6cc --- /dev/null +++ b/core/fxge/dib/cfx_imagestretcher.h @@ -0,0 +1,55 @@ +// 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_IMAGESTRETCHER_H_ +#define CORE_FXGE_DIB_CFX_IMAGESTRETCHER_H_ + +#include + +#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxge/fx_dib.h" + +class CFX_DIBSource; + +class CFX_ImageStretcher { + public: + CFX_ImageStretcher(IFX_ScanlineComposer* pDest, + const CFX_RetainPtr& pSource, + int dest_width, + int dest_height, + const FX_RECT& bitmap_rect, + uint32_t flags); + ~CFX_ImageStretcher(); + + bool Start(); + bool Continue(IFX_Pause* pPause); + + CFX_RetainPtr source() { return m_pSource; } + + private: + bool StartQuickStretch(); + bool StartStretch(); + bool ContinueQuickStretch(IFX_Pause* pPause); + bool ContinueStretch(IFX_Pause* pPause); + + IFX_ScanlineComposer* const m_pDest; + CFX_RetainPtr m_pSource; + std::unique_ptr m_pStretchEngine; + std::unique_ptr m_pScanline; + std::unique_ptr m_pMaskScanline; + const uint32_t m_Flags; + bool m_bFlipX; + bool m_bFlipY; + int m_DestWidth; + int m_DestHeight; + FX_RECT m_ClipRect; + const FXDIB_Format m_DestFormat; + const int m_DestBPP; + int m_LineIndex; +}; + +#endif // CORE_FXGE_DIB_CFX_IMAGESTRETCHER_H_ -- cgit v1.2.3