vcl/source/gdi/outdev4.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
New commits: commit 1987cdeaded55da2a2f224a51c9a1575912b22d6 Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Wed Apr 9 23:16:11 2014 +1000 Fix gradient regressions 1. Fix regression 8659d189ec04a - rect. gradients no longer do grayscale In commit 8659d189ec04aca78c8ffff97fcca507ca0a9ec3 I swapped the passing parameters going to ImplComplexGradient and ImplLinearGradient from aGradient (the copy) to rGradient (the original which didn't have the grayscale applied). 2. Fix regression 954d7ad4ea7 - grayscale applied at wrong time In commit 954d7ad4ea7ec3746b0f0cd3f850a25e82b39c14 grayscale was applied in DrawGradient (Rectangle &rRect...) after the gradient was written to the metafile. I was attempting to bring it into line with what DrawGradient (PolyPolygon &rPolyPoly...) does. However, it remains to be seen if that's actually doing the right thing - so best to revert this as in all likelihood I may have caused a regression with grayscaled gradients Change-Id: Id94549b3366adb8fcf3cddc59d30029579430a30 Reviewed-on: https://gerrit.libreoffice.org/8908 Reviewed-by: Chris Sherlock <chris.sherloc...@gmail.com> Tested-by: Chris Sherlock <chris.sherloc...@gmail.com> diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 16a211f..0198b84 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -631,17 +631,17 @@ void OutputDevice::DrawGradient( const Rectangle& rRect, Gradient aGradient( rGradient ); + if ( mnDrawMode & ( DRAWMODE_GRAYGRADIENT | DRAWMODE_GHOSTEDGRADIENT ) ) + { + SetGrayscaleColors( aGradient ); + } + if( mpMetaFile ) mpMetaFile->AddAction( new MetaGradientAction( rRect, aGradient ) ); if( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) return; - if ( mnDrawMode & ( DRAWMODE_GRAYGRADIENT | DRAWMODE_GHOSTEDGRADIENT ) ) - { - SetGrayscaleColors( aGradient ); - } - if ( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) { // convert rectangle to pixels @@ -685,9 +685,9 @@ void OutputDevice::DrawGradient( const Rectangle& rRect, aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) - ImplDrawLinearGradient( aRect, rGradient, false, NULL ); + ImplDrawLinearGradient( aRect, aGradient, false, NULL ); else - ImplDrawComplexGradient( aRect, rGradient, false, NULL ); + ImplDrawComplexGradient( aRect, aGradient, false, NULL ); } Pop(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits