summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-04-10 01:21:46 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-04-10 01:27:01 +1000
commit8f61d6ca5d6de7615b1e8c10fde6feccc09f2779 (patch)
tree717ce492cb29c922f6cb19b5cad898f57b10bb83 /vcl
parent75508e5d4292c506d8c68caae5b23f90284416a0 (diff)
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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/outdev4.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 5b3032fb69ae..b4b80413097e 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 );
}