diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-13 15:00:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-17 10:52:39 +0200 |
commit | 05db125c57ea3c8f04a304561209c32cc5c45a67 (patch) | |
tree | b145bc06aefb426e9b92fe9b4defea02a5ee4abe /cppcanvas/source/mtfrenderer | |
parent | be9b83445ec19346a4d5c830c955ed573469591a (diff) |
loplugin:staticconstfield improvements
Change-Id: Ia0a19736dfd4500bb17b04c072710f8ee8744031
Reviewed-on: https://gerrit.libreoffice.org/60526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas/source/mtfrenderer')
-rw-r--r-- | cppcanvas/source/mtfrenderer/transparencygroupaction.cxx | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx index c7cd718fc805..8fdfca98a39e 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx @@ -120,7 +120,6 @@ namespace cppcanvas // mxBufferBitmap content CanvasSharedPtr mpCanvas; rendering::RenderState maState; - const double mnAlpha; }; @@ -151,8 +150,7 @@ namespace cppcanvas mxBufferBitmap(), maLastTransformation(), mpCanvas( rCanvas ), - maState(), - mnAlpha( 1.0 ) + maState() { tools::initRenderState(maState,rState); implSetupTransform( maState, rDstPoint ); @@ -400,27 +398,10 @@ namespace cppcanvas aLocalState.DeviceColor = maState.DeviceColor; #endif - if( ::rtl::math::approxEqual(mnAlpha, 1.0) ) - { - // no further alpha changes necessary -> draw directly - mpCanvas->getUNOCanvas()->drawBitmap( mxBufferBitmap, - mpCanvas->getViewState(), - aLocalState ); - } - else - { - // add alpha modulation value to DeviceColor - uno::Sequence<rendering::ARGBColor> aCols(1); - aCols[0] = rendering::ARGBColor( mnAlpha, 1.0, 1.0, 1.0); - aLocalState.DeviceColor = - mpCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace()->convertFromARGB( - aCols); - - mpCanvas->getUNOCanvas()->drawBitmapModulated( mxBufferBitmap, - mpCanvas->getViewState(), - aLocalState ); - } - + // no further alpha changes necessary -> draw directly + mpCanvas->getUNOCanvas()->drawBitmap( mxBufferBitmap, + mpCanvas->getViewState(), + aLocalState ); return true; } |