Kill the ImplSVGDIData::mbNoXORClipping flag
Instead, act as if it was true on all platforms. Don't do XOR clipping on any platform. Simpler code is better code, and XOR tricks are generally very much out of fashion these days, I have been told. Didn't seem to have any visible ill effects on Linux at least. Change-Id: I6192006c77a4a81363ec7b3292f72d512d5e9b53 Reviewed-on: https://gerrit.libreoffice.org/8901 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
This commit is contained in:
parent
0d8e3a1459
commit
cb10a184b9
@ -843,7 +843,6 @@ protected:
|
||||
|
||||
virtual void ClipAndDrawGradientToBounds( Gradient &rGradient, const PolyPolygon &rPolyPoly );
|
||||
void ClipAndDrawGradient( Gradient &rGradient, const PolyPolygon &rPolyPoly );
|
||||
void XORClipAndDrawGradient( Gradient &rGradient, const PolyPolygon &rPolyPoly );
|
||||
|
||||
virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const PolyPolygon &rPolyPoly );
|
||||
|
||||
|
@ -175,7 +175,6 @@ struct ImplSVGDIData
|
||||
long mnAppFontY; // AppFont Y-Numenator for 80/tel Height
|
||||
bool mbFontSubChanged; // true: FontSubstitution was changed between Begin/End
|
||||
bool mbNativeFontConfig; // true: do not override UI font
|
||||
bool mbNoXORClipping; // true: do not use XOR to achieve clipping effects
|
||||
};
|
||||
|
||||
struct ImplSVWinData
|
||||
|
@ -265,7 +265,6 @@ SalInstance *CreateSalInstance()
|
||||
IosSalInstance* pInstance = new IosSalInstance( new SalYieldMutex() );
|
||||
new IosSalData( pInstance );
|
||||
pInstance->AcquireYieldMutex(1);
|
||||
ImplGetSVData()->maGDIData.mbNoXORClipping = true;
|
||||
ImplGetSVData()->maWinData.mbNoSaveBackground = true;
|
||||
return pInstance;
|
||||
}
|
||||
|
@ -336,7 +336,6 @@ SalInstance* CreateSalInstance()
|
||||
ImplGetSVData()->maNWFData.mbProgressNeedsErase = true;
|
||||
ImplGetSVData()->maNWFData.mbCheckBoxNeedsErase = true;
|
||||
ImplGetSVData()->maNWFData.mnStatusBarLowerRightOffset = 10;
|
||||
ImplGetSVData()->maGDIData.mbNoXORClipping = true;
|
||||
ImplGetSVData()->maWinData.mbNoSaveBackground = true;
|
||||
|
||||
return pInst;
|
||||
|
@ -722,10 +722,7 @@ void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, cons
|
||||
|
||||
void OutputDevice::ClipAndDrawGradientToBounds ( Gradient &rGradient, const PolyPolygon &rPolyPoly )
|
||||
{
|
||||
if( ImplGetSVData()->maGDIData.mbNoXORClipping )
|
||||
ClipAndDrawGradient ( rGradient, rPolyPoly );
|
||||
else
|
||||
XORClipAndDrawGradient ( rGradient, rPolyPoly );
|
||||
ClipAndDrawGradient ( rGradient, rPolyPoly );
|
||||
}
|
||||
|
||||
void OutputDevice::ClipAndDrawGradient ( Gradient &rGradient, const PolyPolygon &rPolyPoly )
|
||||
@ -773,60 +770,6 @@ void OutputDevice::ClipAndDrawGradient ( Gradient &rGradient, const PolyPolygon
|
||||
}
|
||||
}
|
||||
|
||||
void OutputDevice::XORClipAndDrawGradient ( Gradient &rGradient, const PolyPolygon &rPolyPoly )
|
||||
{
|
||||
const PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
|
||||
const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
|
||||
Point aPoint;
|
||||
Rectangle aDstRect( aPoint, GetOutputSizePixel() );
|
||||
|
||||
aDstRect.Intersection( aBoundRect );
|
||||
|
||||
ClipToPaintRegion( aDstRect );
|
||||
|
||||
if( !aDstRect.IsEmpty() )
|
||||
{
|
||||
boost::scoped_ptr<VirtualDevice> pVDev;
|
||||
const Size aDstSize( aDstRect.GetSize() );
|
||||
|
||||
if( HasAlpha() )
|
||||
{
|
||||
// #110958# Pay attention to alpha VDevs here, otherwise,
|
||||
// background will be wrong: Temp VDev has to have alpha, too.
|
||||
pVDev.reset(new VirtualDevice( *this, 0, GetAlphaBitCount() > 1 ? 0 : 1 ));
|
||||
}
|
||||
else
|
||||
{
|
||||
// nothing special here. Plain VDev
|
||||
pVDev.reset(new VirtualDevice());
|
||||
}
|
||||
|
||||
if( pVDev->SetOutputSizePixel( aDstSize) )
|
||||
{
|
||||
MapMode aVDevMap;
|
||||
const bool bOldMap = mbMap;
|
||||
|
||||
EnableMapMode( false );
|
||||
|
||||
pVDev->DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this );
|
||||
pVDev->SetRasterOp( ROP_XOR );
|
||||
aVDevMap.SetOrigin( Point( -aDstRect.Left(), -aDstRect.Top() ) );
|
||||
pVDev->SetMapMode( aVDevMap );
|
||||
pVDev->DrawGradient( aBoundRect, rGradient );
|
||||
pVDev->SetFillColor( COL_BLACK );
|
||||
pVDev->SetRasterOp( ROP_0 );
|
||||
pVDev->DrawPolyPolygon( aPolyPoly );
|
||||
pVDev->SetRasterOp( ROP_XOR );
|
||||
pVDev->DrawGradient( aBoundRect, rGradient );
|
||||
aVDevMap.SetOrigin( Point() );
|
||||
pVDev->SetMapMode( aVDevMap );
|
||||
DrawOutDev( aDstRect.TopLeft(), aDstSize, Point(), aDstSize, *pVDev );
|
||||
|
||||
EnableMapMode( bOldMap );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
|
||||
const Gradient& rGradient )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user