diff options
-rw-r--r-- | vcl/source/gdi/outdev4.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/outdev6.cxx | 16 |
2 files changed, 3 insertions, 21 deletions
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 4d23620013c4..0810e6b32f66 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -852,13 +852,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, aDstRect.Intersection( aBoundRect ); - if( OUTDEV_WINDOW == meOutDevType ) - { - const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() ); - - if( !aPaintRgn.IsNull() ) - aDstRect.Intersection( LogicToPixel( aPaintRgn ).GetBoundRect() ); - } + ClipToPaintRegion( aDstRect ); if( !aDstRect.IsEmpty() ) { diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index 0234df345d8d..d96e59fa9ef5 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -346,13 +346,7 @@ void OutputDevice::EmulateDrawTransparent ( const PolyPolygon& rPolyPoly, aDstRect.Intersection( aPolyRect ); - if( OUTDEV_WINDOW == meOutDevType ) - { - const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() ); - - if( !aPaintRgn.IsNull() ) - aDstRect.Intersection( LogicToPixel( aPaintRgn ).GetBoundRect() ); - } + ClipToPaintRegion( aDstRect ); if( !aDstRect.IsEmpty() ) { @@ -632,13 +626,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, mpMetaFile = NULL; aDstRect.Intersection( aOutRect ); - if( OUTDEV_WINDOW == meOutDevType ) - { - const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() ); - - if( !aPaintRgn.IsNull() ) - aDstRect.Intersection( LogicToPixel( aPaintRgn.GetBoundRect() ) ); - } + ClipToPaintRegion( aDstRect ); if( !aDstRect.IsEmpty() ) { |