[Libreoffice-commits] core.git: vcl/source

Chris Sherlock chris.sherlock79 at gmail.com
Sat Apr 19 06:48:32 PDT 2014


 vcl/source/outdev/blend.cxx |   48 ++++++++++++++++++++++----------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 04937a6154ccb99a71a0a6ffac764e8e92ded1bd
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat Apr 19 23:46:10 2014 +1000

    vcl/source/outdev/blend.cxx - indent function in anonymous namespace
    
    Change-Id: I0a82c500b06531ecce35984d7dc588bb9f7dbd04

diff --git a/vcl/source/outdev/blend.cxx b/vcl/source/outdev/blend.cxx
index d32dc86..0b51679 100644
--- a/vcl/source/outdev/blend.cxx
+++ b/vcl/source/outdev/blend.cxx
@@ -52,35 +52,35 @@ namespace
         return sal_uInt8( c );
     }
 
-inline BitmapColor lcl_AlphaBlend( int nX,               int nY,
-                                   const long            nMapX,
-                                   const long            nMapY,
-                                   BitmapReadAccess*     pP,
-                                   BitmapReadAccess*     pA,
-                                   BitmapReadAccess*     pB,
-                                   BitmapWriteAccess*    pAlphaW,
-                                   sal_uInt8&            nResAlpha )
-{
-    BitmapColor aDstCol,aSrcCol;
-    aSrcCol = pP->GetColor( nMapY, nMapX );
-    aDstCol = pB->GetColor( nY, nX );
+    inline BitmapColor lcl_AlphaBlend( int nX,               int nY,
+                                       const long            nMapX,
+                                       const long            nMapY,
+                                       BitmapReadAccess*     pP,
+                                       BitmapReadAccess*     pA,
+                                       BitmapReadAccess*     pB,
+                                       BitmapWriteAccess*    pAlphaW,
+                                       sal_uInt8&            nResAlpha )
+    {
+        BitmapColor aDstCol,aSrcCol;
+        aSrcCol = pP->GetColor( nMapY, nMapX );
+        aDstCol = pB->GetColor( nY, nX );
 
-    // vcl stores transparency, not alpha - invert it
-    const sal_uInt8 nSrcAlpha = 255 - pA->GetPixelIndex( nMapY, nMapX );
-    const sal_uInt8 nDstAlpha = 255 - pAlphaW->GetPixelIndex( nY, nX );
+        // vcl stores transparency, not alpha - invert it
+        const sal_uInt8 nSrcAlpha = 255 - pA->GetPixelIndex( nMapY, nMapX );
+        const sal_uInt8 nDstAlpha = 255 - pAlphaW->GetPixelIndex( nY, nX );
 
-    // Perform porter-duff compositing 'over' operation
+        // Perform porter-duff compositing 'over' operation
 
-    // Co = Cs + Cd*(1-As)
-    // Ad = As + Ad*(1-As)
-    nResAlpha = (int)nSrcAlpha + (int)nDstAlpha - (int)nDstAlpha*nSrcAlpha/255;
+        // Co = Cs + Cd*(1-As)
+        // Ad = As + Ad*(1-As)
+        nResAlpha = (int)nSrcAlpha + (int)nDstAlpha - (int)nDstAlpha*nSrcAlpha/255;
 
-    aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetRed() ) );
-    aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetBlue() ) );
-    aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetGreen() ) );
+        aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetRed() ) );
+        aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetBlue() ) );
+        aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetGreen() ) );
 
-    return aDstCol;
-}
+        return aDstCol;
+    }
 }
 
 Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap              aBmp,


More information about the Libreoffice-commits mailing list