diff options
Diffstat (limited to 'vcl/source/window/clipping.cxx')
-rw-r--r-- | vcl/source/window/clipping.cxx | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx index e2c3a37c8ccf..1fb8e0d77e78 100644 --- a/vcl/source/window/clipping.cxx +++ b/vcl/source/window/clipping.cxx @@ -90,25 +90,25 @@ ParentClipMode Window::GetParentClipMode() const void Window::ExpandPaintClipRegion( const vcl::Region& rRegion ) { - if( mpWindowImpl->mpPaintRegion ) - { - vcl::Region aPixRegion = LogicToPixel( rRegion ); - vcl::Region aDevPixRegion = ImplPixelToDevicePixel( aPixRegion ); + if( !mpWindowImpl->mpPaintRegion ) + return; - vcl::Region aWinChildRegion = *ImplGetWinChildClipRegion(); - // only this region is in frame coordinates, so re-mirror it - if( ImplIsAntiparallel() ) - { - const OutputDevice *pOutDev = GetOutDev(); - pOutDev->ReMirror( aWinChildRegion ); - } + vcl::Region aPixRegion = LogicToPixel( rRegion ); + vcl::Region aDevPixRegion = ImplPixelToDevicePixel( aPixRegion ); - aDevPixRegion.Intersect( aWinChildRegion ); - if( ! aDevPixRegion.IsEmpty() ) - { - mpWindowImpl->mpPaintRegion->Union( aDevPixRegion ); - mbInitClipRegion = true; - } + vcl::Region aWinChildRegion = *ImplGetWinChildClipRegion(); + // only this region is in frame coordinates, so re-mirror it + if( ImplIsAntiparallel() ) + { + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ReMirror( aWinChildRegion ); + } + + aDevPixRegion.Intersect( aWinChildRegion ); + if( ! aDevPixRegion.IsEmpty() ) + { + mpWindowImpl->mpPaintRegion->Union( aDevPixRegion ); + mbInitClipRegion = true; } } @@ -659,19 +659,19 @@ void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Re while ( pWindow ); } - if ( bChildren ) + if ( !bChildren ) + return; + + pWindow = mpWindowImpl->mpFirstChild; + while ( pWindow ) { - pWindow = mpWindowImpl->mpFirstChild; - while ( pWindow ) + if ( pWindow->mpWindowImpl->mbReallyVisible ) { - if ( pWindow->mpWindowImpl->mbReallyVisible ) - { - aTempRegion = aRegion; - pWindow->ImplIntersectWindowRegion( aTempRegion ); - rRegion.Union( aTempRegion ); - } - pWindow = pWindow->mpWindowImpl->mpNext; + aTempRegion = aRegion; + pWindow->ImplIntersectWindowRegion( aTempRegion ); + rRegion.Union( aTempRegion ); } + pWindow = pWindow->mpWindowImpl->mpNext; } } |