build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / vcl / source / window / clipping.cxx
blob13989cd09b49369ee0605cafd369376450d411b6
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 <sal/types.h>
25 #include <salobj.hxx>
26 #include <window.h>
28 namespace vcl {
30 void Window::InitClipRegion()
32 DBG_TESTSOLARMUTEX();
34 vcl::Region aRegion;
36 if ( mpWindowImpl->mbInPaint )
37 aRegion = *(mpWindowImpl->mpPaintRegion);
38 else
40 aRegion = *(ImplGetWinChildClipRegion());
41 // --- RTL -- only this region is in frame coordinates, so re-mirror it
42 // the mpWindowImpl->mpPaintRegion above is already correct (see ImplCallPaint()) !
43 if( ImplIsAntiparallel() )
44 ReMirror ( aRegion );
46 if ( mbClipRegion )
47 aRegion.Intersect( ImplPixelToDevicePixel( maRegion ) );
48 if ( aRegion.IsEmpty() )
49 mbOutputClipped = true;
50 else
52 mbOutputClipped = false;
53 SelectClipRegion( aRegion );
55 mbClipRegionSet = true;
57 mbInitClipRegion = false;
60 void Window::SetParentClipMode( ParentClipMode nMode )
62 if ( mpWindowImpl->mpBorderWindow )
63 mpWindowImpl->mpBorderWindow->SetParentClipMode( nMode );
64 else
66 if ( !ImplIsOverlapWindow() )
68 mpWindowImpl->mnParentClipMode = nMode;
69 if ( nMode & ParentClipMode::Clip )
70 mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = true;
75 ParentClipMode Window::GetParentClipMode() const
77 if ( mpWindowImpl->mpBorderWindow )
78 return mpWindowImpl->mpBorderWindow->GetParentClipMode();
79 else
80 return mpWindowImpl->mnParentClipMode;
83 void Window::ExpandPaintClipRegion( const vcl::Region& rRegion )
85 if( mpWindowImpl->mpPaintRegion )
87 vcl::Region aPixRegion = LogicToPixel( rRegion );
88 vcl::Region aDevPixRegion = ImplPixelToDevicePixel( aPixRegion );
90 vcl::Region aWinChildRegion = *ImplGetWinChildClipRegion();
91 // --- RTL -- only this region is in frame coordinates, so re-mirror it
92 if( ImplIsAntiparallel() )
94 const OutputDevice *pOutDev = GetOutDev();
95 pOutDev->ReMirror( aWinChildRegion );
98 aDevPixRegion.Intersect( aWinChildRegion );
99 if( ! aDevPixRegion.IsEmpty() )
101 mpWindowImpl->mpPaintRegion->Union( aDevPixRegion );
102 mbInitClipRegion = true;
107 vcl::Region Window::GetWindowClipRegionPixel() const
109 vcl::Region aWinClipRegion;
111 if ( mpWindowImpl->mbInitWinClipRegion )
112 const_cast<vcl::Window*>(this)->ImplInitWinClipRegion();
113 aWinClipRegion = mpWindowImpl->maWinClipRegion;
115 Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
116 vcl::Region aWinRegion( aWinRect );
118 if ( aWinRegion == aWinClipRegion )
119 aWinClipRegion.SetNull();
121 aWinClipRegion.Move( -mnOutOffX, -mnOutOffY );
123 return aWinClipRegion;
127 vcl::Region Window::GetActiveClipRegion() const
129 vcl::Region aRegion(true);
131 if ( mpWindowImpl->mbInPaint )
133 aRegion = *(mpWindowImpl->mpPaintRegion);
134 aRegion.Move( -mnOutOffX, -mnOutOffY );
137 if ( mbClipRegion )
138 aRegion.Intersect( maRegion );
140 return PixelToLogic( aRegion );
143 void Window::ClipToPaintRegion(Rectangle& rDstRect)
145 const vcl::Region aPaintRgn(GetPaintRegion());
147 if (!aPaintRgn.IsNull())
148 rDstRect.Intersection(LogicToPixel(aPaintRgn.GetBoundRect()));
151 void Window::EnableClipSiblings( bool bClipSiblings )
154 if ( mpWindowImpl->mpBorderWindow )
155 mpWindowImpl->mpBorderWindow->EnableClipSiblings( bClipSiblings );
157 mpWindowImpl->mbClipSiblings = bClipSiblings;
160 void Window::ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlaps )
162 if ( bThis )
163 ImplIntersectWindowClipRegion( rRegion );
164 else if ( ImplIsOverlapWindow() )
166 // clip to frame if required
167 if ( !mpWindowImpl->mbFrame )
168 rRegion.Intersect( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
170 if ( bOverlaps && !rRegion.IsEmpty() )
172 // Clip Overlap Siblings
173 vcl::Window* pStartOverlapWindow = this;
174 while ( !pStartOverlapWindow->mpWindowImpl->mbFrame )
176 vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
177 while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) )
179 pOverlapWindow->ImplExcludeOverlapWindows2( rRegion );
180 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
182 pStartOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow;
185 // Clip Child Overlap Windows
186 ImplExcludeOverlapWindows( rRegion );
189 else
190 ImplGetParent()->ImplIntersectWindowClipRegion( rRegion );
193 bool Window::ImplClipChildren( vcl::Region& rRegion )
195 bool bOtherClip = false;
196 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
197 while ( pWindow )
199 if ( pWindow->mpWindowImpl->mbReallyVisible )
201 // read-out ParentClipMode-Flags
202 ParentClipMode nClipMode = pWindow->GetParentClipMode();
203 if ( !(nClipMode & ParentClipMode::NoClip) &&
204 ((nClipMode & ParentClipMode::Clip) || (GetStyle() & WB_CLIPCHILDREN)) )
205 pWindow->ImplExcludeWindowRegion( rRegion );
206 else
207 bOtherClip = true;
210 pWindow = pWindow->mpWindowImpl->mpNext;
213 return bOtherClip;
216 void Window::ImplClipAllChildren( vcl::Region& rRegion )
218 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
219 while ( pWindow )
221 if ( pWindow->mpWindowImpl->mbReallyVisible )
222 pWindow->ImplExcludeWindowRegion( rRegion );
223 pWindow = pWindow->mpWindowImpl->mpNext;
227 void Window::ImplClipSiblings( vcl::Region& rRegion )
229 vcl::Window* pWindow = ImplGetParent()->mpWindowImpl->mpFirstChild;
230 while ( pWindow )
232 if ( pWindow == this )
233 break;
235 if ( pWindow->mpWindowImpl->mbReallyVisible )
236 pWindow->ImplExcludeWindowRegion( rRegion );
238 pWindow = pWindow->mpWindowImpl->mpNext;
242 void Window::ImplInitWinClipRegion()
244 // Build Window Region
245 mpWindowImpl->maWinClipRegion = Rectangle( Point( mnOutOffX, mnOutOffY ),
246 Size( mnOutWidth, mnOutHeight ) );
247 if ( mpWindowImpl->mbWinRegion )
248 mpWindowImpl->maWinClipRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
250 // ClipSiblings
251 if ( mpWindowImpl->mbClipSiblings && !ImplIsOverlapWindow() )
252 ImplClipSiblings( mpWindowImpl->maWinClipRegion );
254 // Clip Parent Boundaries
255 ImplClipBoundaries( mpWindowImpl->maWinClipRegion, false, true );
257 // Clip Children
258 if ( (GetStyle() & WB_CLIPCHILDREN) || mpWindowImpl->mbClipChildren )
259 mpWindowImpl->mbInitChildRegion = true;
261 mpWindowImpl->mbInitWinClipRegion = false;
264 void Window::ImplInitWinChildClipRegion()
266 if ( !mpWindowImpl->mpFirstChild )
268 if ( mpWindowImpl->mpChildClipRegion )
270 delete mpWindowImpl->mpChildClipRegion;
271 mpWindowImpl->mpChildClipRegion = nullptr;
274 else
276 if ( !mpWindowImpl->mpChildClipRegion )
277 mpWindowImpl->mpChildClipRegion = new vcl::Region( mpWindowImpl->maWinClipRegion );
278 else
279 *mpWindowImpl->mpChildClipRegion = mpWindowImpl->maWinClipRegion;
281 ImplClipChildren( *mpWindowImpl->mpChildClipRegion );
284 mpWindowImpl->mbInitChildRegion = false;
287 Region* Window::ImplGetWinChildClipRegion()
289 if ( mpWindowImpl->mbInitWinClipRegion )
290 ImplInitWinClipRegion();
291 if ( mpWindowImpl->mbInitChildRegion )
292 ImplInitWinChildClipRegion();
293 if ( mpWindowImpl->mpChildClipRegion )
294 return mpWindowImpl->mpChildClipRegion;
295 else
296 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* pWinChildClipRegion = ImplGetWinChildClipRegion();
312 if ( !pWinChildClipRegion->IsEmpty() )
314 if ( pOldRegion )
316 vcl::Region aNewRegion = *pWinChildClipRegion;
317 pWinChildClipRegion->Intersect( *pOldRegion );
318 bUpdate = aNewRegion == *pWinChildClipRegion;
321 vcl::Region aRegion = *pWinChildClipRegion;
322 Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
323 vcl::Region aWinRectRegion( aWinRect );
325 if ( aRegion == aWinRectRegion )
326 mpWindowImpl->mpSysObj->ResetClipRegion();
327 else
329 aRegion.Move( -mnOutOffX, -mnOutOffY );
331 // set/update clip region
332 RectangleVector aRectangles;
333 aRegion.GetRegionRectangles(aRectangles);
334 mpWindowImpl->mpSysObj->BeginSetClipRegion(aRectangles.size());
336 for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
338 mpWindowImpl->mpSysObj->UnionClipRegion(
339 aRectIter->Left(),
340 aRectIter->Top(),
341 aRectIter->GetWidth(), // orig nWidth was ((R - L) + 1), same as GetWidth does
342 aRectIter->GetHeight()); // same for height
345 mpWindowImpl->mpSysObj->EndSetClipRegion();
348 else
349 bVisibleState = false;
352 // update visible status
353 mpWindowImpl->mpSysObj->Show( bVisibleState );
356 return bUpdate;
359 void Window::ImplUpdateSysObjChildrenClip()
361 if ( mpWindowImpl->mpSysObj && mpWindowImpl->mbInitWinClipRegion )
362 ImplSysObjClip( nullptr );
364 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
365 while ( pWindow )
367 pWindow->ImplUpdateSysObjChildrenClip();
368 pWindow = pWindow->mpWindowImpl->mpNext;
372 void Window::ImplUpdateSysObjOverlapsClip()
374 ImplUpdateSysObjChildrenClip();
376 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
377 while ( pWindow )
379 pWindow->ImplUpdateSysObjOverlapsClip();
380 pWindow = pWindow->mpWindowImpl->mpNext;
384 void Window::ImplUpdateSysObjClip()
386 if ( !ImplIsOverlapWindow() )
388 ImplUpdateSysObjChildrenClip();
390 // siblings should recalculate their clip region
391 if ( mpWindowImpl->mbClipSiblings )
393 vcl::Window* pWindow = mpWindowImpl->mpNext;
394 while ( pWindow )
396 pWindow->ImplUpdateSysObjChildrenClip();
397 pWindow = pWindow->mpWindowImpl->mpNext;
401 else
402 mpWindowImpl->mpFrameWindow->ImplUpdateSysObjOverlapsClip();
405 bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller )
407 bool bUpdate = true;
408 if ( mpWindowImpl->mpSysObj )
410 vcl::Region* pOldRegion = nullptr;
411 if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion )
412 pOldRegion = new vcl::Region( mpWindowImpl->maWinClipRegion );
414 mbInitClipRegion = true;
415 mpWindowImpl->mbInitWinClipRegion = true;
417 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
418 while ( pWindow )
420 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
421 bUpdate = false;
422 pWindow = pWindow->mpWindowImpl->mpNext;
425 if ( !ImplSysObjClip( pOldRegion ) )
427 mbInitClipRegion = true;
428 mpWindowImpl->mbInitWinClipRegion = true;
429 bUpdate = false;
432 delete pOldRegion;
434 else
436 mbInitClipRegion = true;
437 mpWindowImpl->mbInitWinClipRegion = true;
439 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
440 while ( pWindow )
442 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
443 bUpdate = false;
444 pWindow = pWindow->mpWindowImpl->mpNext;
447 return bUpdate;
450 bool Window::ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller )
452 bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller );
454 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
455 while ( pWindow )
457 if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) )
458 bUpdate = false;
459 pWindow = pWindow->mpWindowImpl->mpNext;
462 return bUpdate;
465 bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller )
467 if ( !ImplIsOverlapWindow() )
469 bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller );
471 vcl::Window* pParent = ImplGetParent();
472 if ( pParent &&
473 ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & ParentClipMode::Clip)) )
475 pParent->mbInitClipRegion = true;
476 pParent->mpWindowImpl->mbInitChildRegion = true;
479 // siblings should recalculate their clip region
480 if ( mpWindowImpl->mbClipSiblings )
482 vcl::Window* pWindow = mpWindowImpl->mpNext;
483 while ( pWindow )
485 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
486 bUpdate = false;
487 pWindow = pWindow->mpWindowImpl->mpNext;
491 return bUpdate;
493 else
494 return mpWindowImpl->mpFrameWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller );
497 void Window::ImplIntersectWindowClipRegion( vcl::Region& rRegion )
499 if ( mpWindowImpl->mbInitWinClipRegion )
500 ImplInitWinClipRegion();
502 rRegion.Intersect( mpWindowImpl->maWinClipRegion );
505 void Window::ImplIntersectWindowRegion( vcl::Region& rRegion )
507 rRegion.Intersect( Rectangle( Point( mnOutOffX, mnOutOffY ),
508 Size( mnOutWidth, mnOutHeight ) ) );
509 if ( mpWindowImpl->mbWinRegion )
510 rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
513 void Window::ImplExcludeWindowRegion( vcl::Region& rRegion )
515 if ( mpWindowImpl->mbWinRegion )
517 Point aPoint( mnOutOffX, mnOutOffY );
518 vcl::Region aRegion( Rectangle( aPoint,
519 Size( mnOutWidth, mnOutHeight ) ) );
520 aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
521 rRegion.Exclude( aRegion );
523 else
525 Point aPoint( mnOutOffX, mnOutOffY );
526 rRegion.Exclude( Rectangle( aPoint,
527 Size( mnOutWidth, mnOutHeight ) ) );
531 void Window::ImplExcludeOverlapWindows( vcl::Region& rRegion )
533 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
534 while ( pWindow )
536 if ( pWindow->mpWindowImpl->mbReallyVisible )
538 pWindow->ImplExcludeWindowRegion( rRegion );
539 pWindow->ImplExcludeOverlapWindows( rRegion );
542 pWindow = pWindow->mpWindowImpl->mpNext;
546 void Window::ImplExcludeOverlapWindows2( vcl::Region& rRegion )
548 if ( mpWindowImpl->mbReallyVisible )
549 ImplExcludeWindowRegion( rRegion );
551 ImplExcludeOverlapWindows( rRegion );
554 void Window::ImplIntersectAndUnionOverlapWindows( const vcl::Region& rInterRegion, vcl::Region& rRegion )
556 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
557 while ( pWindow )
559 if ( pWindow->mpWindowImpl->mbReallyVisible )
561 vcl::Region aTempRegion( rInterRegion );
562 pWindow->ImplIntersectWindowRegion( aTempRegion );
563 rRegion.Union( aTempRegion );
564 pWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
567 pWindow = pWindow->mpWindowImpl->mpNext;
571 void Window::ImplIntersectAndUnionOverlapWindows2( const vcl::Region& rInterRegion, vcl::Region& rRegion )
573 if ( mpWindowImpl->mbReallyVisible )
575 vcl::Region aTempRegion( rInterRegion );
576 ImplIntersectWindowRegion( aTempRegion );
577 rRegion.Union( aTempRegion );
580 ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
583 void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion )
585 // Clip Overlap Siblings
586 vcl::Window* pStartOverlapWindow;
587 if ( !ImplIsOverlapWindow() )
588 pStartOverlapWindow = mpWindowImpl->mpOverlapWindow;
589 else
590 pStartOverlapWindow = this;
591 while ( !pStartOverlapWindow->mpWindowImpl->mbFrame )
593 vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
594 while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) )
596 pOverlapWindow->ImplIntersectAndUnionOverlapWindows2( rInterRegion, rRegion );
597 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
599 pStartOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow;
602 // Clip Child Overlap Windows
603 if ( !ImplIsOverlapWindow() )
604 mpWindowImpl->mpOverlapWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
605 else
606 ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
609 void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion,
610 bool bChildren, bool bSiblings )
612 vcl::Region aRegion( rSourceRect );
613 if ( mpWindowImpl->mbWinRegion )
614 rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
615 vcl::Region aTempRegion;
616 vcl::Window* pWindow;
618 ImplCalcOverlapRegionOverlaps( aRegion, rRegion );
620 // Parent-Boundaries
621 pWindow = this;
622 if ( !ImplIsOverlapWindow() )
624 pWindow = ImplGetParent();
627 aTempRegion = aRegion;
628 pWindow->ImplExcludeWindowRegion( aTempRegion );
629 rRegion.Union( aTempRegion );
630 if ( pWindow->ImplIsOverlapWindow() )
631 break;
632 pWindow = pWindow->ImplGetParent();
634 while ( pWindow );
636 if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
638 aTempRegion = aRegion;
639 aTempRegion.Exclude( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
640 rRegion.Union( aTempRegion );
643 // Siblings
644 if ( bSiblings && !ImplIsOverlapWindow() )
646 pWindow = mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild;
649 if ( pWindow->mpWindowImpl->mbReallyVisible && (pWindow != this) )
651 aTempRegion = aRegion;
652 pWindow->ImplIntersectWindowRegion( aTempRegion );
653 rRegion.Union( aTempRegion );
655 pWindow = pWindow->mpWindowImpl->mpNext;
657 while ( pWindow );
660 if ( bChildren )
662 pWindow = mpWindowImpl->mpFirstChild;
663 while ( pWindow )
665 if ( pWindow->mpWindowImpl->mbReallyVisible )
667 aTempRegion = aRegion;
668 pWindow->ImplIntersectWindowRegion( aTempRegion );
669 rRegion.Union( aTempRegion );
671 pWindow = pWindow->mpWindowImpl->mpNext;
676 void Window::SaveBackground( const Point& rPos, const Size& rSize,
677 const Point& rDestOff, VirtualDevice& rSaveDevice )
679 if ( mpWindowImpl->mpPaintRegion )
681 vcl::Region aClip( *mpWindowImpl->mpPaintRegion );
682 const Point aPixPos( LogicToPixel( rPos ) );
684 aClip.Move( -mnOutOffX, -mnOutOffY );
685 aClip.Intersect( Rectangle( aPixPos, LogicToPixel( rSize ) ) );
687 if ( !aClip.IsEmpty() )
689 const vcl::Region aOldClip( rSaveDevice.GetClipRegion() );
690 const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) );
691 const bool bMap = rSaveDevice.IsMapModeEnabled();
693 // move clip region to have the same distance to DestOffset
694 aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() );
696 // set pixel clip region
697 rSaveDevice.EnableMapMode( false );
698 rSaveDevice.SetClipRegion( aClip );
699 rSaveDevice.EnableMapMode( bMap );
700 rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
701 rSaveDevice.SetClipRegion( aOldClip );
704 else
705 rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
708 } /* namespace vcl */
710 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */