diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-03-09 22:55:00 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-03-10 11:30:35 +0100 |
commit | af5ff9ee32031c9eb7b4545cb2db6186792fda8f (patch) | |
tree | be863efc0eb1968c1fbca77699fa2cd5c67d01a0 /drawinglayer | |
parent | 69959235c3094b811406f734e863a63fc61046c0 (diff) |
use VCL API rather than manually apply numeric alpha change
Change-Id: I500b3ad3d8229b792b7394a9e1b2f51fa9b1af2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112251
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclhelperbufferdevice.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index 927dacd12b65..e192a29a0a6f 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -410,11 +410,11 @@ void impBufferDevice::paint(double fTrans) } else if (0.0 != fTrans) { - sal_uInt8 nMaskValue(static_cast<sal_uInt8>(basegfx::fround(fTrans * 255.0))); - AlphaMask aAlphaMask(aSizePixel, &nMaskValue); - BitmapEx aContent(mpContent->GetBitmapEx(aEmptyPoint, aSizePixel)); - aAlphaMask.BlendWith(aContent.GetAlpha()); - mrOutDev.DrawBitmapEx(maDestPixel.TopLeft(), BitmapEx(aContent.GetBitmap(), aAlphaMask)); + basegfx::B2DHomMatrix trans, scale; + trans.translate(maDestPixel.TopLeft().X(), maDestPixel.TopLeft().Y()); + scale.scale(aSizePixel.Width(), aSizePixel.Height()); + mrOutDev.DrawTransformedBitmapEx( + trans * scale, mpContent->GetBitmapEx(aEmptyPoint, aSizePixel), 1 - fTrans); } else { |