summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-01-16 11:52:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-16 17:47:57 +0100
commit508c2e4a2d2b26d6b1842ff98e9aaa4d3adddf80 (patch)
tree2de868966e0802cbbe66c6008f8eec6aea75b74f /include
parent1cc0fc1f3cdae597912d7204256427e060fcde61 (diff)
transparency->alpha in vcl::RawBitmap
Change-Id: I68e05555518f0dc6a7c01d2fec734b0d0aff0d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109427 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/RawBitmap.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/vcl/RawBitmap.hxx b/include/vcl/RawBitmap.hxx
index d3dcb642cf6c..26e08dbdedac 100644
--- a/include/vcl/RawBitmap.hxx
+++ b/include/vcl/RawBitmap.hxx
@@ -47,7 +47,7 @@ public:
mpData[p++] = nColor.GetGreen();
mpData[p++] = nColor.GetBlue();
if (mnBitCount == 32)
- mpData[p] = 255 - nColor.GetAlpha();
+ mpData[p] = nColor.GetAlpha();
}
Color GetPixel(tools::Long nY, tools::Long nX) const
{
@@ -55,7 +55,7 @@ public:
if (mnBitCount == 24)
return Color(mpData[p], mpData[p + 1], mpData[p + 2]);
else
- return Color(ColorTransparency, mpData[p + 3], mpData[p], mpData[p + 1], mpData[p + 2]);
+ return Color(ColorAlpha, mpData[p + 3], mpData[p], mpData[p + 1], mpData[p + 2]);
}
// so we don't accidentally leave any code in that uses palette color indexes
void SetPixel(tools::Long nY, tools::Long nX, BitmapColor nColor) = delete;