Factor out and simplify COM-safe wait
[LibreOffice.git] / vcl / source / window / clipping.cxx
blobf55283cff886072703097ec811ae6dcf4b1fa9bd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <vcl/window.hxx>
21 #include <vcl/virdev.hxx>
23 #include <tools/debug.hxx>
25 #include <salobj.hxx>
26 #include <window.h>
28 namespace vcl {
30 vcl::Region WindowOutputDevice::GetOutputBoundsClipRegion() const
32 vcl::Region aClip(GetClipRegion());
33 aClip.Intersect(tools::Rectangle(Point(), GetOutputSize()));
35 return aClip;
38 void WindowOutputDevice::InitClipRegion()
40 DBG_TESTSOLARMUTEX();
42 vcl::Region aRegion;
44 if ( mxOwnerWindow->mpWindowImpl->mbInPaint )
45 aRegion = *(mxOwnerWindow->mpWindowImpl->mpPaintRegion);
46 else
48 aRegion = mxOwnerWindow->ImplGetWinChildClipRegion();
49 // only this region is in frame coordinates, so re-mirror it
50 // the mpWindowImpl->mpPaintRegion above is already correct (see ImplCallPaint()) !
51 if( ImplIsAntiparallel() )
52 ReMirror ( aRegion );
54 if ( mbClipRegion )
55 aRegion.Intersect( ImplPixelToDevicePixel( maRegion ) );
56 if ( aRegion.IsEmpty() )
57 mbOutputClipped = true;
58 else
60 mbOutputClipped = false;
61 SelectClipRegion( aRegion );
63 mbClipRegionSet = true;
65 mbInitClipRegion = false;
68 void Window::SetParentClipMode( ParentClipMode nMode )
70 if ( mpWindowImpl->mpBorderWindow )
71 mpWindowImpl->mpBorderWindow->SetParentClipMode( nMode );
72 else
74 if ( !ImplIsOverlapWindow() )
76 mpWindowImpl->mnParentClipMode = nMode;
77 if ( nMode & ParentClipMode::Clip )
78 mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = true;
83 ParentClipMode Window::GetParentClipMode() const
85 if ( mpWindowImpl->mpBorderWindow )
86 return mpWindowImpl->mpBorderWindow->GetParentClipMode();
87 else
88 return mpWindowImpl->mnParentClipMode;
91 void Window::ExpandPaintClipRegion( const vcl::Region& rRegion )
93 if( !mpWindowImpl->mpPaintRegion )
94 return;
96 vcl::Region aPixRegion = LogicToPixel( rRegion );
97 vcl::Region aDevPixRegion = GetOutDev()->ImplPixelToDevicePixel( aPixRegion );
99 vcl::Region aWinChildRegion = ImplGetWinChildClipRegion();
100 // only this region is in frame coordinates, so re-mirror it
101 if( GetOutDev()->ImplIsAntiparallel() )
103 const OutputDevice *pOutDev = GetOutDev();
104 pOutDev->ReMirror( aWinChildRegion );
107 aDevPixRegion.Intersect( aWinChildRegion );
108 if( ! aDevPixRegion.IsEmpty() )
110 mpWindowImpl->mpPaintRegion->Union( aDevPixRegion );
111 GetOutDev()->mbInitClipRegion = true;
115 vcl::Region Window::GetWindowClipRegionPixel() const
117 vcl::Region aWinClipRegion;
119 if ( mpWindowImpl->mbInitWinClipRegion )
120 const_cast<vcl::Window*>(this)->ImplInitWinClipRegion();
121 aWinClipRegion = mpWindowImpl->maWinClipRegion;
123 vcl::Region aWinRegion( GetOutputRectPixel() );
125 if ( aWinRegion == aWinClipRegion )
126 aWinClipRegion.SetNull();
128 aWinClipRegion.Move( -GetOutDev()->mnOutOffX, -GetOutDev()->mnOutOffY );
130 return aWinClipRegion;
134 vcl::Region WindowOutputDevice::GetActiveClipRegion() const
136 vcl::Region aRegion(true);
138 if ( mxOwnerWindow->mpWindowImpl->mbInPaint )
140 aRegion = *(mxOwnerWindow->mpWindowImpl->mpPaintRegion);
141 aRegion.Move( -mnOutOffX, -mnOutOffY );
144 if ( mbClipRegion )
145 aRegion.Intersect( maRegion );
147 return PixelToLogic( aRegion );
150 void WindowOutputDevice::ClipToPaintRegion(tools::Rectangle& rDstRect)
152 const vcl::Region aPaintRgn(mxOwnerWindow->GetPaintRegion());
154 if (!aPaintRgn.IsNull())
155 rDstRect.Intersection(LogicToPixel(aPaintRgn.GetBoundRect()));
158 void Window::EnableClipSiblings( bool bClipSiblings )
161 if ( mpWindowImpl->mpBorderWindow )
162 mpWindowImpl->mpBorderWindow->EnableClipSiblings( bClipSiblings );
164 mpWindowImpl->mbClipSiblings = bClipSiblings;
167 void Window::ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlaps )
169 if ( bThis )
170 ImplIntersectWindowClipRegion( rRegion );
171 else if ( ImplIsOverlapWindow() )
173 // clip to frame if required
174 if ( !mpWindowImpl->mbFrame )
175 rRegion.Intersect( tools::Rectangle( Point( 0, 0 ), mpWindowImpl->mpFrameWindow->GetOutputSizePixel() ) );
177 if ( bOverlaps && !rRegion.IsEmpty() )
179 // Clip Overlap Siblings
180 vcl::Window* pStartOverlapWindow = this;
181 while ( !pStartOverlapWindow->mpWindowImpl->mbFrame )
183 vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
184 while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) )
186 pOverlapWindow->ImplExcludeOverlapWindows2( rRegion );
187 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
189 pStartOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow;
192 // Clip Child Overlap Windows
193 ImplExcludeOverlapWindows( rRegion );
196 else
197 ImplGetParent()->ImplIntersectWindowClipRegion( rRegion );
200 bool Window::ImplClipChildren( vcl::Region& rRegion ) const
202 bool bOtherClip = false;
203 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
204 while ( pWindow )
206 if ( pWindow->mpWindowImpl->mbReallyVisible )
208 // read-out ParentClipMode-Flags
209 ParentClipMode nClipMode = pWindow->GetParentClipMode();
210 if ( !(nClipMode & ParentClipMode::NoClip) &&
211 ((nClipMode & ParentClipMode::Clip) || (GetStyle() & WB_CLIPCHILDREN)) )
212 pWindow->ImplExcludeWindowRegion( rRegion );
213 else
214 bOtherClip = true;
217 pWindow = pWindow->mpWindowImpl->mpNext;
220 return bOtherClip;
223 void Window::ImplClipAllChildren( vcl::Region& rRegion ) const
225 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
226 while ( pWindow )
228 if ( pWindow->mpWindowImpl->mbReallyVisible )
229 pWindow->ImplExcludeWindowRegion( rRegion );
230 pWindow = pWindow->mpWindowImpl->mpNext;
234 void Window::ImplClipSiblings( vcl::Region& rRegion ) const
236 vcl::Window* pWindow = ImplGetParent()->mpWindowImpl->mpFirstChild;
237 while ( pWindow )
239 if ( pWindow == this )
240 break;
242 if ( pWindow->mpWindowImpl->mbReallyVisible )
243 pWindow->ImplExcludeWindowRegion( rRegion );
245 pWindow = pWindow->mpWindowImpl->mpNext;
249 void Window::ImplInitWinClipRegion()
251 // Build Window Region
252 mpWindowImpl->maWinClipRegion = GetOutputRectPixel();
253 if ( mpWindowImpl->mbWinRegion )
254 mpWindowImpl->maWinClipRegion.Intersect( GetOutDev()->ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
256 // ClipSiblings
257 if ( mpWindowImpl->mbClipSiblings && !ImplIsOverlapWindow() )
258 ImplClipSiblings( mpWindowImpl->maWinClipRegion );
260 // Clip Parent Boundaries
261 ImplClipBoundaries( mpWindowImpl->maWinClipRegion, false, true );
263 // Clip Children
264 if ( (GetStyle() & WB_CLIPCHILDREN) || mpWindowImpl->mbClipChildren )
265 mpWindowImpl->mbInitChildRegion = true;
267 mpWindowImpl->mbInitWinClipRegion = false;
270 void Window::ImplInitWinChildClipRegion()
272 if ( !mpWindowImpl->mpFirstChild )
274 mpWindowImpl->mpChildClipRegion.reset();
276 else
278 if ( !mpWindowImpl->mpChildClipRegion )
279 mpWindowImpl->mpChildClipRegion.reset( new vcl::Region( mpWindowImpl->maWinClipRegion ) );
280 else
281 *mpWindowImpl->mpChildClipRegion = mpWindowImpl->maWinClipRegion;
283 ImplClipChildren( *mpWindowImpl->mpChildClipRegion );
286 mpWindowImpl->mbInitChildRegion = false;
289 Region& Window::ImplGetWinChildClipRegion()
291 if ( mpWindowImpl->mbInitWinClipRegion )
292 ImplInitWinClipRegion();
293 if ( mpWindowImpl->mbInitChildRegion )
294 ImplInitWinChildClipRegion();
295 if ( mpWindowImpl->mpChildClipRegion )
296 return *mpWindowImpl->mpChildClipRegion;
297 return mpWindowImpl->maWinClipRegion;
300 bool Window::ImplSysObjClip( const vcl::Region* pOldRegion )
302 bool bUpdate = true;
304 if ( mpWindowImpl->mpSysObj )
306 bool bVisibleState = mpWindowImpl->mbReallyVisible;
308 if ( bVisibleState )
310 vcl::Region& rWinChildClipRegion = ImplGetWinChildClipRegion();
312 if (!rWinChildClipRegion.IsEmpty())
314 if ( pOldRegion )
316 vcl::Region aNewRegion = rWinChildClipRegion;
317 rWinChildClipRegion.Intersect(*pOldRegion);
318 bUpdate = aNewRegion == rWinChildClipRegion;
321 vcl::Region aRegion = rWinChildClipRegion;
322 vcl::Region aWinRectRegion( GetOutputRectPixel() );
324 if ( aRegion == aWinRectRegion )
325 mpWindowImpl->mpSysObj->ResetClipRegion();
326 else
328 aRegion.Move( -GetOutDev()->mnOutOffX, -GetOutDev()->mnOutOffY );
330 // set/update clip region
331 RectangleVector aRectangles;
332 aRegion.GetRegionRectangles(aRectangles);
333 mpWindowImpl->mpSysObj->BeginSetClipRegion(aRectangles.size());
335 for (auto const& rectangle : aRectangles)
337 mpWindowImpl->mpSysObj->UnionClipRegion(
338 rectangle.Left(),
339 rectangle.Top(),
340 rectangle.GetWidth(), // orig nWidth was ((R - L) + 1), same as GetWidth does
341 rectangle.GetHeight()); // same for height
344 mpWindowImpl->mpSysObj->EndSetClipRegion();
347 else
348 bVisibleState = false;
351 // update visible status
352 mpWindowImpl->mpSysObj->Show( bVisibleState );
355 return bUpdate;
358 void Window::ImplUpdateSysObjChildrenClip()
360 if ( mpWindowImpl->mpSysObj && mpWindowImpl->mbInitWinClipRegion )
361 ImplSysObjClip( nullptr );
363 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
364 while ( pWindow )
366 pWindow->ImplUpdateSysObjChildrenClip();
367 pWindow = pWindow->mpWindowImpl->mpNext;
371 void Window::ImplUpdateSysObjOverlapsClip()
373 ImplUpdateSysObjChildrenClip();
375 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
376 while ( pWindow )
378 pWindow->ImplUpdateSysObjOverlapsClip();
379 pWindow = pWindow->mpWindowImpl->mpNext;
383 void Window::ImplUpdateSysObjClip()
385 if ( !ImplIsOverlapWindow() )
387 ImplUpdateSysObjChildrenClip();
389 // siblings should recalculate their clip region
390 if ( mpWindowImpl->mbClipSiblings )
392 vcl::Window* pWindow = mpWindowImpl->mpNext;
393 while ( pWindow )
395 pWindow->ImplUpdateSysObjChildrenClip();
396 pWindow = pWindow->mpWindowImpl->mpNext;
400 else
401 mpWindowImpl->mpFrameWindow->ImplUpdateSysObjOverlapsClip();
404 bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller )
406 bool bUpdate = true;
407 if ( mpWindowImpl->mpSysObj )
409 std::unique_ptr<vcl::Region> pOldRegion;
410 if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion )
411 pOldRegion.reset(new vcl::Region( mpWindowImpl->maWinClipRegion ));
413 GetOutDev()->mbInitClipRegion = true;
414 mpWindowImpl->mbInitWinClipRegion = true;
416 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
417 while ( pWindow )
419 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
420 bUpdate = false;
421 pWindow = pWindow->mpWindowImpl->mpNext;
424 if ( !ImplSysObjClip( pOldRegion.get() ) )
426 GetOutDev()->mbInitClipRegion = true;
427 mpWindowImpl->mbInitWinClipRegion = true;
428 bUpdate = false;
431 else
433 GetOutDev()->mbInitClipRegion = true;
434 mpWindowImpl->mbInitWinClipRegion = true;
436 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
437 while ( pWindow )
439 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
440 bUpdate = false;
441 pWindow = pWindow->mpWindowImpl->mpNext;
444 return bUpdate;
447 bool Window::ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller )
449 bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller );
451 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
452 while ( pWindow )
454 if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) )
455 bUpdate = false;
456 pWindow = pWindow->mpWindowImpl->mpNext;
459 return bUpdate;
462 bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller )
464 if ( !ImplIsOverlapWindow() )
466 bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller );
468 vcl::Window* pParent = ImplGetParent();
469 if ( pParent &&
470 ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & ParentClipMode::Clip)) )
472 pParent->GetOutDev()->mbInitClipRegion = true;
473 pParent->mpWindowImpl->mbInitChildRegion = true;
476 // siblings should recalculate their clip region
477 if ( mpWindowImpl->mbClipSiblings )
479 vcl::Window* pWindow = mpWindowImpl->mpNext;
480 while ( pWindow )
482 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
483 bUpdate = false;
484 pWindow = pWindow->mpWindowImpl->mpNext;
488 return bUpdate;
490 else
491 return mpWindowImpl->mpFrameWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller );
494 void Window::ImplIntersectWindowClipRegion( vcl::Region& rRegion )
496 if ( mpWindowImpl->mbInitWinClipRegion )
497 ImplInitWinClipRegion();
499 rRegion.Intersect( mpWindowImpl->maWinClipRegion );
502 void Window::ImplIntersectWindowRegion( vcl::Region& rRegion )
504 rRegion.Intersect( GetOutputRectPixel() );
505 if ( mpWindowImpl->mbWinRegion )
506 rRegion.Intersect( GetOutDev()->ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
509 void Window::ImplExcludeWindowRegion( vcl::Region& rRegion )
511 if ( mpWindowImpl->mbWinRegion )
513 vcl::Region aRegion( GetOutputRectPixel() );
514 aRegion.Intersect( GetOutDev()->ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
515 rRegion.Exclude( aRegion );
517 else
519 rRegion.Exclude( GetOutputRectPixel() );
523 void Window::ImplExcludeOverlapWindows( vcl::Region& rRegion ) const
525 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
526 while ( pWindow )
528 if ( pWindow->mpWindowImpl->mbReallyVisible )
530 pWindow->ImplExcludeWindowRegion( rRegion );
531 pWindow->ImplExcludeOverlapWindows( rRegion );
534 pWindow = pWindow->mpWindowImpl->mpNext;
538 void Window::ImplExcludeOverlapWindows2( vcl::Region& rRegion )
540 if ( mpWindowImpl->mbReallyVisible )
541 ImplExcludeWindowRegion( rRegion );
543 ImplExcludeOverlapWindows( rRegion );
546 void Window::ImplIntersectAndUnionOverlapWindows( const vcl::Region& rInterRegion, vcl::Region& rRegion ) const
548 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
549 while ( pWindow )
551 if ( pWindow->mpWindowImpl->mbReallyVisible )
553 vcl::Region aTempRegion( rInterRegion );
554 pWindow->ImplIntersectWindowRegion( aTempRegion );
555 rRegion.Union( aTempRegion );
556 pWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
559 pWindow = pWindow->mpWindowImpl->mpNext;
563 void Window::ImplIntersectAndUnionOverlapWindows2( const vcl::Region& rInterRegion, vcl::Region& rRegion )
565 if ( mpWindowImpl->mbReallyVisible )
567 vcl::Region aTempRegion( rInterRegion );
568 ImplIntersectWindowRegion( aTempRegion );
569 rRegion.Union( aTempRegion );
572 ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
575 void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion ) const
577 // Clip Overlap Siblings
578 vcl::Window const * pStartOverlapWindow;
579 if ( !ImplIsOverlapWindow() )
580 pStartOverlapWindow = mpWindowImpl->mpOverlapWindow;
581 else
582 pStartOverlapWindow = this;
583 while ( !pStartOverlapWindow->mpWindowImpl->mbFrame )
585 vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
586 while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) )
588 pOverlapWindow->ImplIntersectAndUnionOverlapWindows2( rInterRegion, rRegion );
589 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
591 pStartOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow;
594 // Clip Child Overlap Windows
595 if ( !ImplIsOverlapWindow() )
596 mpWindowImpl->mpOverlapWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
597 else
598 ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
601 void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Region& rRegion,
602 bool bChildren, bool bSiblings )
604 vcl::Region aRegion( rSourceRect );
605 if ( mpWindowImpl->mbWinRegion )
606 rRegion.Intersect( GetOutDev()->ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
607 vcl::Region aTempRegion;
608 vcl::Window* pWindow;
610 ImplCalcOverlapRegionOverlaps( aRegion, rRegion );
612 // Parent-Boundaries
613 pWindow = this;
614 if ( !ImplIsOverlapWindow() )
616 pWindow = ImplGetParent();
619 aTempRegion = aRegion;
620 pWindow->ImplExcludeWindowRegion( aTempRegion );
621 rRegion.Union( aTempRegion );
622 if ( pWindow->ImplIsOverlapWindow() )
623 break;
624 pWindow = pWindow->ImplGetParent();
626 while ( pWindow );
628 if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
630 aTempRegion = aRegion;
631 aTempRegion.Exclude( tools::Rectangle( Point( 0, 0 ), mpWindowImpl->mpFrameWindow->GetOutputSizePixel() ) );
632 rRegion.Union( aTempRegion );
635 // Siblings
636 if ( bSiblings && !ImplIsOverlapWindow() )
638 pWindow = mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild;
641 if ( pWindow->mpWindowImpl->mbReallyVisible && (pWindow != this) )
643 aTempRegion = aRegion;
644 pWindow->ImplIntersectWindowRegion( aTempRegion );
645 rRegion.Union( aTempRegion );
647 pWindow = pWindow->mpWindowImpl->mpNext;
649 while ( pWindow );
652 if ( !bChildren )
653 return;
655 pWindow = mpWindowImpl->mpFirstChild;
656 while ( pWindow )
658 if ( pWindow->mpWindowImpl->mbReallyVisible )
660 aTempRegion = aRegion;
661 pWindow->ImplIntersectWindowRegion( aTempRegion );
662 rRegion.Union( aTempRegion );
664 pWindow = pWindow->mpWindowImpl->mpNext;
668 void WindowOutputDevice::SaveBackground(VirtualDevice& rSaveDevice, const Point& rPos, const Size& rSize, const Size&) const
670 MapMode aTempMap(GetMapMode());
671 aTempMap.SetOrigin(Point());
672 rSaveDevice.SetMapMode(aTempMap);
674 if ( mxOwnerWindow->mpWindowImpl->mpPaintRegion )
676 vcl::Region aClip( *mxOwnerWindow->mpWindowImpl->mpPaintRegion );
677 const Point aPixPos( LogicToPixel( rPos ) );
679 aClip.Move( -mnOutOffX, -mnOutOffY );
680 aClip.Intersect( tools::Rectangle( aPixPos, LogicToPixel( rSize ) ) );
682 if ( !aClip.IsEmpty() )
684 const vcl::Region aOldClip( rSaveDevice.GetClipRegion() );
685 const Point aPixOffset( rSaveDevice.LogicToPixel( Point() ) );
686 const bool bMap = rSaveDevice.IsMapModeEnabled();
688 // move clip region to have the same distance to DestOffset
689 aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() );
691 // set pixel clip region
692 rSaveDevice.EnableMapMode( false );
693 rSaveDevice.SetClipRegion( aClip );
694 rSaveDevice.EnableMapMode( bMap );
695 rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
696 rSaveDevice.SetClipRegion( aOldClip );
699 else
701 rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
704 rSaveDevice.SetMapMode(MapMode());
707 } /* namespace vcl */
709 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */