summaryrefslogtreecommitdiff
path: root/include/vcl/outdev.hxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2020-12-26 22:05:54 +1100
committerTomaž Vajngerl <quikee@gmail.com>2020-12-28 01:53:39 +0100
commit0c2042b34f34824e6ff8ffc78acad46be4faa7cf (patch)
tree0d42e590f2824098fa542c9bffdbb626b4da576b /include/vcl/outdev.hxx
parent1bb5011c6f261d3f6946ca6a78e2be17fa60a245 (diff)
vcl: remove OutputDevice::ScaleBitmap
Some time ago, in an attempt to remove a check on OutDevType I refactored some code into the function ScaleBitmap(). When I look at this more closely, I realise that I missed the point of the function. The code I refactored actually checked if subsampled scaling could be done. Thus, the function is inaccurate - it only scales *down* a bitmap, and in fact scaling is already done in Bitmap. Instead, I have now moved the function back into the code and replaced it with a virtual function that checks if the OutputDevice derived class can actually do bitmap subsampling (Printer is unable to do subsampling). Change-Id: I2e6bdbba0bf2153e0421efe6e05c05dd593a4e1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108323 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/vcl/outdev.hxx')
-rw-r--r--include/vcl/outdev.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index c11d1abc1875..052b0afb3086 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1491,7 +1491,7 @@ protected:
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
BitmapEx& rBitmapEx );
- virtual void ScaleBitmap ( Bitmap &rBmp, SalTwoRect &rPosAry );
+ virtual bool CanSubsampleBitmap() const { return true; }
/** Transform and draw a bitmap directly