Index: source/gdi/outdev4.cxx =================================================================== RCS file: /cvs/oo/gsl/vcl/source/gdi/outdev4.cxx,v retrieving revision 1.7.6.1 diff -u -p -u -r1.7.6.1 outdev4.cxx --- source/gdi/outdev4.cxx 2002/06/04 12:54:10 1.7.6.1 +++ source/gdi/outdev4.cxx 2002/09/09 18:16:26 @@ -1006,31 +1021,39 @@ void OutputDevice::DrawGradient( const P if( !aDstRect.IsEmpty() ) { VirtualDevice aVDev; + VirtualDevice aVDev2; const Size aDstSize( aDstRect.GetSize() ); - if( aVDev.SetOutputSizePixel( aDstSize) ) + if( aVDev.SetOutputSizePixel( aDstSize ) && + aVDev2.SetOutputSizePixel( aDstSize ) ) { MapMode aVDevMap; const RasterOp eOldROP = GetRasterOp(); const BOOL bOldMap = mbMap; mbMap = FALSE; + + aVDevMap.SetOrigin( Point( -aDstRect.Left(), -aDstRect.Top() ) ); + aVDev.SetMapMode( aVDevMap ); + aVDev.DrawGradient( aBoundRect, aGradient ); - aVDev.DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this ); - DrawGradient( aBoundRect, aGradient ); + aVDev2.SetRasterOp( ROP_OVERPAINT ); + aVDev2.DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, aVDev ); + aVDev.SetRasterOp( ROP_XOR ); - aVDev.DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this ); + aVDev.DrawOutDev( aDstRect.TopLeft(), aDstSize, aDstRect.TopLeft(), aDstSize, *this ); + aVDev.SetFillColor( COL_BLACK ); aVDev.SetRasterOp( ROP_0 ); - aVDevMap.SetOrigin( Point( -aDstRect.Left(), -aDstRect.Top() ) ); - aVDev.SetMapMode( aVDevMap ); aVDev.DrawPolyPolygon( aPolyPoly ); - aVDevMap.SetOrigin( Point() ); - aVDev.SetMapMode( aVDevMap ); - SetRasterOp( ROP_XOR ); - DrawOutDev( aDstRect.TopLeft(), aDstSize, Point(), aDstSize, aVDev ); - SetRasterOp( eOldROP ); + aVDev2.SetRasterOp( ROP_XOR ); + aVDev2.DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, aVDev ); + + SetRasterOp( ROP_OVERPAINT ); + DrawOutDev( aDstRect.TopLeft(), aDstSize, Point(), aDstSize, aVDev2 ); + + SetRasterOp( eOldROP ); mbMap = bOldMap; } }