Kaydet (Commit) 8f61d6ca authored tarafından Chris Sherlock's avatar Chris Sherlock

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
üst 75508e5d
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment