[Libreoffice-commits] .: canvas/source

Julien Nabet serval2412 at kemper.freedesktop.org
Mon Jul 16 14:09:59 PDT 2012


 canvas/source/vcl/canvashelper.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5cfd4e920023ecb6caa9061bc0a52ea03def83c6
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Jul 16 23:09:35 2012 +0200

    Reduce scope
    
    Change-Id: Ifbfd8e4b7a549d0225229a60a12b1b346fc02828

diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index fde6ebe..8b025e0 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -483,7 +483,6 @@ namespace vclcanvas
             tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
 
             const int nTransparency( setupOutDevState( viewState, renderState, FILL_COLOR ) );
-            const int nTransPercent( (nTransparency * 100 + 128) / 255 );  // normal rounding, no truncation here
             ::basegfx::B2DPolyPolygon aB2DPolyPoly(
                 ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon));
             aB2DPolyPoly.setClosed(true); // ensure closed poly, otherwise VCL does not fill
@@ -497,6 +496,7 @@ namespace vclcanvas
             }
             else
             {
+                const int nTransPercent( (nTransparency * 100 + 128) / 255 );  // normal rounding, no truncation here
                 mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
             }
 


More information about the Libreoffice-commits mailing list