drawinglayer/inc/texture/texture3d.hxx    |    2 +-
 drawinglayer/source/texture/texture3d.cxx |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 30862f999acc54e2690d28f97b95764f664c1f5a
Author:     Patrick Luby <guibmac...@gmail.com>
AuthorDate: Sun Mar 3 19:34:09 2024 -0500
Commit:     Patrick Luby <guibomac...@gmail.com>
CommitDate: Mon Mar 4 15:41:41 2024 +0100

    tdf#159515 rename impGetTransparence() to impGetAlpha()
    
    Commit 81994cb2b8b32453a92bcb011830fcb884f22ff3 makes
    impGetTransparence() return alpha instead of transparence. So,
    rename the function and skip reverting the result to obtain the
    alpha value.
    
    Change-Id: Ied3bf8ae4a0de2ae36074dba9f78ccc93480b15a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164322
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Patrick Luby <guibomac...@gmail.com>
    Tested-by: Patrick Luby <guibomac...@gmail.com>
    (cherry picked from commit b4caea04cb63cbdc25bab871a5b20aa16e2f3a77)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164371
    Tested-by: Jenkins

diff --git a/drawinglayer/inc/texture/texture3d.hxx 
b/drawinglayer/inc/texture/texture3d.hxx
index 07f4b181b2ad..1ec4df70734c 100644
--- a/drawinglayer/inc/texture/texture3d.hxx
+++ b/drawinglayer/inc/texture/texture3d.hxx
@@ -66,7 +66,7 @@ namespace drawinglayer::texture
 
             // helpers
             bool impIsValid(const basegfx::B2DPoint& rUV, sal_Int32& rX, 
sal_Int32& rY) const;
-            sal_uInt8 impGetTransparence(sal_Int32 rX, sal_Int32 rY) const;
+            sal_uInt8 impGetAlpha(sal_Int32 rX, sal_Int32 rY) const;
 
         public:
             GeoTexSvxBitmapEx(
diff --git a/drawinglayer/source/texture/texture3d.cxx 
b/drawinglayer/source/texture/texture3d.cxx
index 3ee751cbbda4..4cbcab9d1c5d 100644
--- a/drawinglayer/source/texture/texture3d.cxx
+++ b/drawinglayer/source/texture/texture3d.cxx
@@ -103,7 +103,7 @@ namespace drawinglayer::texture
         {
         }
 
-        sal_uInt8 GeoTexSvxBitmapEx::impGetTransparence(sal_Int32 rX, 
sal_Int32 rY) const
+        sal_uInt8 GeoTexSvxBitmapEx::impGetAlpha(sal_Int32 rX, sal_Int32 rY) 
const
         {
             if(mbIsAlpha)
             {
@@ -148,10 +148,10 @@ namespace drawinglayer::texture
 
                 if(mbIsAlpha)
                 {
-                    // when we have a transparence, make use of it
-                    const sal_uInt8 aLuminance(impGetTransparence(nX, nY));
+                    // when we have alpha, make use of it
+                    const sal_uInt8 aAlpha(impGetAlpha(nX, nY));
 
-                    rfOpacity = (static_cast<double>(0xff - aLuminance) * (1.0 
/ 255.0));
+                    rfOpacity = (static_cast<double>(aAlpha) * (1.0 / 255.0));
                 }
                 else
                 {
@@ -173,8 +173,8 @@ namespace drawinglayer::texture
                 if(mbIsAlpha)
                 {
                     // this texture has an alpha part, use it
-                    const sal_uInt8 aLuminance(impGetTransparence(nX, nY));
-                    const double fNewOpacity(static_cast<double>(0xff - 
aLuminance) * (1.0 / 255.0));
+                    const sal_uInt8 aAlpha(impGetAlpha(nX, nY));
+                    const double fNewOpacity(static_cast<double>(aAlpha) * 
(1.0 / 255.0));
 
                     rfOpacity = 1.0 - ((1.0 - fNewOpacity) * (1.0 - 
rfOpacity));
                 }

Reply via email to