diff options
Diffstat (limited to 'core/fxge/dib/fx_dib_main.cpp')
-rw-r--r-- | core/fxge/dib/fx_dib_main.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp index 8df1322e97..dfdf7ec909 100644 --- a/core/fxge/dib/fx_dib_main.cpp +++ b/core/fxge/dib/fx_dib_main.cpp @@ -54,6 +54,29 @@ const int16_t SDP_Table[513] = { 0, 0, 0, }; +FXDIB_ResampleOptions::FXDIB_ResampleOptions() = default; + +FXDIB_ResampleOptions::FXDIB_ResampleOptions(bool downsample, + bool bilinear, + bool bicubic, + bool halftone, + bool no_smoothing, + bool lossy) + : bInterpolateDownsample(downsample), + bInterpolateBilinear(bilinear), + bInterpolateBicubic(bicubic), + bHalftone(halftone), + bNoSmoothing(no_smoothing), + bLossy(lossy) {} + +bool FXDIB_ResampleOptions::HasAnyOptions() const { + return bInterpolateDownsample || bInterpolateBilinear || + bInterpolateBicubic || bHalftone || bNoSmoothing || bLossy; +} + +const FXDIB_ResampleOptions kBilinearInterpolation = { + false, /*bilinear=*/true, false, false, false, false}; + FX_RECT FXDIB_SwapClipBox(const FX_RECT& clip, int width, int height, |