summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2024-09-22 17:26:58 +1000
committerTomaž Vajngerl <quikee@gmail.com>2024-09-23 11:57:13 +0200
commitc32e874a4f13acb87966731dbc5554fc95fa8e2b (patch)
tree2a689b365c1b855e19a32ea52296cd77419340f7 /vcl
parent8733ffc6a4e79e007ec9725a183ef04a7fbf0fb6 (diff)
vcl: mask scale regression in BitmapFastScaleFilter
Masks are not scaled in the fast scaling filter. The issue occured when migrating to the BitmapFastScaleFilter class - maSize was never set. The size is now calculated in execute() locally. Regression from: commit d246aa574571409046619254292698184c2545a3 date Sun Apr 15 10:14:10 2018 +1000 author Chris Sherlock <chris.sherlock79@gmail.com> vcl: move Bitmap::ImplScaleFast() and Bitmap::ImplScaleInterpolate() Change-Id: I9cc36f609059ae2db9c4cdb169bd5110382cfb21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173766 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/bitmap/BitmapFastScaleFilter.hxx1
-rw-r--r--vcl/source/bitmap/BitmapFastScaleFilter.cxx2
2 files changed, 1 insertions, 2 deletions
diff --git a/vcl/inc/bitmap/BitmapFastScaleFilter.hxx b/vcl/inc/bitmap/BitmapFastScaleFilter.hxx
index bea516c9e01a..ab2c14e67180 100644
--- a/vcl/inc/bitmap/BitmapFastScaleFilter.hxx
+++ b/vcl/inc/bitmap/BitmapFastScaleFilter.hxx
@@ -28,7 +28,6 @@ public:
private:
double mfScaleX;
double mfScaleY;
- Size maSize;
};
#endif
diff --git a/vcl/source/bitmap/BitmapFastScaleFilter.cxx b/vcl/source/bitmap/BitmapFastScaleFilter.cxx
index 584942457f74..456c3d7bcc8a 100644
--- a/vcl/source/bitmap/BitmapFastScaleFilter.cxx
+++ b/vcl/source/bitmap/BitmapFastScaleFilter.cxx
@@ -115,7 +115,7 @@ BitmapEx BitmapFastScaleFilter::execute(BitmapEx const& rBitmapEx) const
AlphaMask aMask(rBitmapEx.GetAlphaMask());
if (bRet && !aMask.IsEmpty())
- bRet = aMask.Scale(maSize, BmpScaleFlag::Fast);
+ bRet = aMask.Scale(Size(nNewWidth, nNewHeight), BmpScaleFlag::Fast);
SAL_WARN_IF(!aMask.IsEmpty() && aBitmap.GetSizePixel() != aMask.GetSizePixel(), "vcl",
"BitmapEx::Scale(): size mismatch for bitmap and alpha mask.");