diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-11 08:54:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-12 17:38:53 +0100 |
commit | d765ec2295d12ccde1fb25aa92c5d821de748add (patch) | |
tree | c2f806389478df23b78319c6043971f92995851c /chart2 | |
parent | a1d6701105456248f6ff39766a6699f26a8f3d60 (diff) |
transparency->alpha in tools::Color
this just changes the Get/Set methods, the constructor and internal
representation of Color is not changed.
Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/VDataSeries.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx index d9bb82e8c30c..bb628a9419e3 100644 --- a/chart2/source/view/main/VDataSeries.cxx +++ b/chart2/source/view/main/VDataSeries.cxx @@ -1130,7 +1130,7 @@ double VDataSeries::getValueByProperty( sal_Int32 nIndex, const OUString& rPropN sal_uInt8 r = aOldColor.GetRed() + (aColor.GetRed() - aOldColor.GetRed()) * mnPercent; sal_uInt8 g = aOldColor.GetGreen() + (aColor.GetGreen() - aOldColor.GetGreen()) * mnPercent; sal_uInt8 b = aOldColor.GetBlue() + (aColor.GetBlue() - aOldColor.GetBlue()) * mnPercent; - sal_uInt8 t = aOldColor.GetTransparency() + (aColor.GetTransparency() - aOldColor.GetTransparency()) * mnPercent; + sal_uInt8 t = 255 - (aOldColor.GetAlpha() + (aColor.GetAlpha() - aOldColor.GetAlpha()) * mnPercent); Color aRet(t, r, g, b); return sal_uInt32(aRet); } |