diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-19 23:46:10 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-19 23:46:10 +1000 |
commit | 04937a6154ccb99a71a0a6ffac764e8e92ded1bd (patch) | |
tree | 4a9b817c23cdaaf22de529d914a3ce28f9fa262b /vcl | |
parent | eef0dd74e3158ae881ef37ddde49b3bb809b5831 (diff) |
vcl/source/outdev/blend.cxx - indent function in anonymous namespace
Change-Id: I0a82c500b06531ecce35984d7dc588bb9f7dbd04
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/blend.cxx | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/vcl/source/outdev/blend.cxx b/vcl/source/outdev/blend.cxx index d32dc86075b9..0b516790df20 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, |