summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-10-02 16:19:17 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-10-03 09:29:53 +0200
commit1aa7f471c54ef5a15b714a487188c2d7f1735f12 (patch)
tree5053e39b2078312e51fc5f46aeaef39c94c02319 /vcl
parent6ee9ab65db0a993bc93bbf0140f0a4657be10657 (diff)
use a proper alpha mask bitmap
Bitmap(size,8) is not actually 8bit grey bitmap, it uses some other palette, so BitmapEx ctor will convert it. This is a silly mistake from c2275ee554cae1cf4909a4fc12be4be127be011e. Change-Id: Id7e8cac5d187859cac067ab3fa075e4e4749f91f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103865 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/bitmap.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index bcab1a4d7793..2a013fe119b2 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1088,8 +1088,8 @@ bool OutputDevice::DrawTransformBitmapExDirect(
}
else if (mpAlphaVDev)
{
- aAlphaBitmap = Bitmap(rBitmapEx.GetSizePixel(), 8);
- aAlphaBitmap.Erase(COL_BLACK);
+ aAlphaBitmap = AlphaMask(rBitmapEx.GetSizePixel());
+ aAlphaBitmap.Erase(COL_BLACK); // opaque
}
SalBitmap* pSalAlphaBmp = aAlphaBitmap.ImplGetSalBitmap().get();
@@ -1105,8 +1105,8 @@ bool OutputDevice::DrawTransformBitmapExDirect(
if (mpAlphaVDev)
{
// Merge bitmap alpha to alpha device
- Bitmap aBlack(rBitmapEx.GetSizePixel(), 8);
- aBlack.Erase(COL_BLACK);
+ AlphaMask aBlack(rBitmapEx.GetSizePixel());
+ aBlack.Erase(0); // opaque
mpAlphaVDev->DrawTransformBitmapExDirect(aFullTransform, BitmapEx(aBlack, aAlphaBitmap));
}