drawinglayer/source/processor2d/vclhelperbufferdevice.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit af5ff9ee32031c9eb7b4545cb2db6186792fda8f Author: Luboš Luňák <[email protected]> AuthorDate: Tue Mar 9 22:55:00 2021 +0100 Commit: Luboš Luňák <[email protected]> CommitDate: Wed Mar 10 11:30:35 2021 +0100 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 <[email protected]> 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 { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
