#include "core/fxge/dib/cstretchengine.h"
#include <math.h>
#include <algorithm>
#include <type_traits>
#include <utility>
#include "core/fxcrt/check.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/pauseindicator_iface.h"
#include "core/fxge/calculate_pitch.h"
#include "core/fxge/dib/cfx_dibbase.h"
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/dib/fx_dib.h"
#include "core/fxge/dib/scanlinecomposer_iface.h"
static_assert …;
namespace {
size_t TotalBytesForWeightCount(size_t weight_count) { … }
}
bool CStretchEngine::UseInterpolateBilinear(
const FXDIB_ResampleOptions& options,
int dest_width,
int dest_height,
int src_width,
int src_height) { … }
CStretchEngine::WeightTable::WeightTable() = default;
CStretchEngine::WeightTable::~WeightTable() = default;
bool CStretchEngine::WeightTable::CalculateWeights(
int dest_len,
int dest_min,
int dest_max,
int src_len,
int src_min,
int src_max,
const FXDIB_ResampleOptions& options) { … }
const CStretchEngine::PixelWeight* CStretchEngine::WeightTable::GetPixelWeight(
int pixel) const { … }
CStretchEngine::PixelWeight* CStretchEngine::WeightTable::GetPixelWeight(
int pixel) { … }
CStretchEngine::CStretchEngine(ScanlineComposerIface* pDestBitmap,
FXDIB_Format dest_format,
int dest_width,
int dest_height,
const FX_RECT& clip_rect,
const RetainPtr<const CFX_DIBBase>& pSrcBitmap,
const FXDIB_ResampleOptions& options)
: … { … }
CStretchEngine::~CStretchEngine() = default;
bool CStretchEngine::Continue(PauseIndicatorIface* pPause) { … }
bool CStretchEngine::StartStretchHorz() { … }
bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { … }
void CStretchEngine::StretchVert() { … }