summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cfx_imagetransformer.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/dib/cfx_imagetransformer.h')
-rw-r--r--core/fxge/dib/cfx_imagetransformer.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/fxge/dib/cfx_imagetransformer.h b/core/fxge/dib/cfx_imagetransformer.h
index 40d51ec2a1..dcda687d42 100644
--- a/core/fxge/dib/cfx_imagetransformer.h
+++ b/core/fxge/dib/cfx_imagetransformer.h
@@ -32,6 +32,21 @@ class CFX_ImageTransformer {
RetainPtr<CFX_DIBitmap> DetachBitmap();
private:
+ bool IsBilinear() const {
+ return !(m_Flags & FXDIB_DOWNSAMPLE) && !IsBiCubic();
+ }
+ bool IsBiCubic() const { return !!(m_Flags & FXDIB_BICUBIC_INTERPOL); }
+
+ int stretch_width() const { return m_StretchClip.Width(); }
+ int stretch_height() const { return m_StretchClip.Height(); }
+
+ bool InStretchBounds(int col, int row) const {
+ return col >= 0 && col <= stretch_width() && row >= 0 &&
+ row <= stretch_height();
+ }
+
+ void AdjustCoords(int* col, int* row) const;
+
const RetainPtr<CFX_DIBSource> m_pSrc;
UnownedPtr<const CFX_Matrix> const m_pMatrix;
const FX_RECT* const m_pClip;