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

Chris Sherlock chris.sherlock79 at gmail.com
Wed Apr 9 08:28:02 PDT 2014


 vcl/source/gdi/outdev4.cxx |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 8f61d6ca5d6de7615b1e8c10fde6feccc09f2779
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu Apr 10 01:21:46 2014 +1000

    Cannot draw metafile-based grayscale gradient into a polygon
    
    OutputDevice::DrawGradient doesn't check to see if it's meant to be
    drawing a grayscale gradient when it adds it into the OutputDevice
    metafile. Now fixed.
    
    Change-Id: I83cb5255c01901e33ca1f751e91e8a77292663e6

diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 5b3032f..b4b8041 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -853,6 +853,13 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
             return;
         }
 
+        Gradient aGradient( rGradient );
+
+        if ( mnDrawMode & ( DRAWMODE_GRAYGRADIENT | DRAWMODE_GHOSTEDGRADIENT ) )
+        {
+            SetGrayscaleColors( aGradient );
+        }
+
         if( mpMetaFile )
         {
             mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
@@ -866,13 +873,6 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
         if( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
             return;
 
-        Gradient aGradient( rGradient );
-
-        if ( mnDrawMode & ( DRAWMODE_GRAYGRADIENT | DRAWMODE_GHOSTEDGRADIENT ) )
-        {
-            SetGrayscaleColors( aGradient );
-        }
-
         ClipAndDrawGradientToBounds ( aGradient, rPolyPoly );
     }
 


More information about the Libreoffice-commits mailing list