Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / vcl / source / window / clipping.cxx
blob6889ee7c63e2ebb852dd6658687674c5d8200477
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 void Window::InitClipRegion()
32 DBG_TESTSOLARMUTEX();
34 vcl::Region aRegion;
36 if ( mpWindowImpl->mbInPaint )
37 aRegion = *(mpWindowImpl->mpPaintRegion);
38 else
40 aRegion = *(ImplGetWinChildClipRegion());
41 // 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 // 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 tools::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(tools::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( tools::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 ) const
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 ) const
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 ) const
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 = tools::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 mpWindowImpl->mpChildClipRegion.reset();
270 else
272 if ( !mpWindowImpl->mpChildClipRegion )
273 mpWindowImpl->mpChildClipRegion.reset( new vcl::Region( mpWindowImpl->maWinClipRegion ) );
274 else
275 *mpWindowImpl->mpChildClipRegion = mpWindowImpl->maWinClipRegion;
277 ImplClipChildren( *mpWindowImpl->mpChildClipRegion );
280 mpWindowImpl->mbInitChildRegion = false;
283 Region* Window::ImplGetWinChildClipRegion()
285 if ( mpWindowImpl->mbInitWinClipRegion )
286 ImplInitWinClipRegion();
287 if ( mpWindowImpl->mbInitChildRegion )
288 ImplInitWinChildClipRegion();
289 if ( mpWindowImpl->mpChildClipRegion )
290 return mpWindowImpl->mpChildClipRegion.get();
291 else
292 return &mpWindowImpl->maWinClipRegion;
296 bool Window::ImplSysObjClip( const vcl::Region* pOldRegion )
298 bool bUpdate = true;
300 if ( mpWindowImpl->mpSysObj )
302 bool bVisibleState = mpWindowImpl->mbReallyVisible;
304 if ( bVisibleState )
306 vcl::Region* pWinChildClipRegion = ImplGetWinChildClipRegion();
308 if ( !pWinChildClipRegion->IsEmpty() )
310 if ( pOldRegion )
312 vcl::Region aNewRegion = *pWinChildClipRegion;
313 pWinChildClipRegion->Intersect( *pOldRegion );
314 bUpdate = aNewRegion == *pWinChildClipRegion;
317 vcl::Region aRegion = *pWinChildClipRegion;
318 tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
319 vcl::Region aWinRectRegion( aWinRect );
321 if ( aRegion == aWinRectRegion )
322 mpWindowImpl->mpSysObj->ResetClipRegion();
323 else
325 aRegion.Move( -mnOutOffX, -mnOutOffY );
327 // set/update clip region
328 RectangleVector aRectangles;
329 aRegion.GetRegionRectangles(aRectangles);
330 mpWindowImpl->mpSysObj->BeginSetClipRegion(aRectangles.size());
332 for (auto const& rectangle : aRectangles)
334 mpWindowImpl->mpSysObj->UnionClipRegion(
335 rectangle.Left(),
336 rectangle.Top(),
337 rectangle.GetWidth(), // orig nWidth was ((R - L) + 1), same as GetWidth does
338 rectangle.GetHeight()); // same for height
341 mpWindowImpl->mpSysObj->EndSetClipRegion();
344 else
345 bVisibleState = false;
348 // update visible status
349 mpWindowImpl->mpSysObj->Show( bVisibleState );
352 return bUpdate;
355 void Window::ImplUpdateSysObjChildrenClip()
357 if ( mpWindowImpl->mpSysObj && mpWindowImpl->mbInitWinClipRegion )
358 ImplSysObjClip( nullptr );
360 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
361 while ( pWindow )
363 pWindow->ImplUpdateSysObjChildrenClip();
364 pWindow = pWindow->mpWindowImpl->mpNext;
368 void Window::ImplUpdateSysObjOverlapsClip()
370 ImplUpdateSysObjChildrenClip();
372 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
373 while ( pWindow )
375 pWindow->ImplUpdateSysObjOverlapsClip();
376 pWindow = pWindow->mpWindowImpl->mpNext;
380 void Window::ImplUpdateSysObjClip()
382 if ( !ImplIsOverlapWindow() )
384 ImplUpdateSysObjChildrenClip();
386 // siblings should recalculate their clip region
387 if ( mpWindowImpl->mbClipSiblings )
389 vcl::Window* pWindow = mpWindowImpl->mpNext;
390 while ( pWindow )
392 pWindow->ImplUpdateSysObjChildrenClip();
393 pWindow = pWindow->mpWindowImpl->mpNext;
397 else
398 mpWindowImpl->mpFrameWindow->ImplUpdateSysObjOverlapsClip();
401 bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller )
403 bool bUpdate = true;
404 if ( mpWindowImpl->mpSysObj )
406 std::unique_ptr<vcl::Region> pOldRegion;
407 if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion )
408 pOldRegion.reset(new vcl::Region( mpWindowImpl->maWinClipRegion ));
410 mbInitClipRegion = true;
411 mpWindowImpl->mbInitWinClipRegion = true;
413 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
414 while ( pWindow )
416 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
417 bUpdate = false;
418 pWindow = pWindow->mpWindowImpl->mpNext;
421 if ( !ImplSysObjClip( pOldRegion.get() ) )
423 mbInitClipRegion = true;
424 mpWindowImpl->mbInitWinClipRegion = true;
425 bUpdate = false;
428 else
430 mbInitClipRegion = true;
431 mpWindowImpl->mbInitWinClipRegion = true;
433 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
434 while ( pWindow )
436 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
437 bUpdate = false;
438 pWindow = pWindow->mpWindowImpl->mpNext;
441 return bUpdate;
444 bool Window::ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller )
446 bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller );
448 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
449 while ( pWindow )
451 if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) )
452 bUpdate = false;
453 pWindow = pWindow->mpWindowImpl->mpNext;
456 return bUpdate;
459 bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller )
461 if ( !ImplIsOverlapWindow() )
463 bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller );
465 vcl::Window* pParent = ImplGetParent();
466 if ( pParent &&
467 ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & ParentClipMode::Clip)) )
469 pParent->mbInitClipRegion = true;
470 pParent->mpWindowImpl->mbInitChildRegion = true;
473 // siblings should recalculate their clip region
474 if ( mpWindowImpl->mbClipSiblings )
476 vcl::Window* pWindow = mpWindowImpl->mpNext;
477 while ( pWindow )
479 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
480 bUpdate = false;
481 pWindow = pWindow->mpWindowImpl->mpNext;
485 return bUpdate;
487 else
488 return mpWindowImpl->mpFrameWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller );
491 void Window::ImplIntersectWindowClipRegion( vcl::Region& rRegion )
493 if ( mpWindowImpl->mbInitWinClipRegion )
494 ImplInitWinClipRegion();
496 rRegion.Intersect( mpWindowImpl->maWinClipRegion );
499 void Window::ImplIntersectWindowRegion( vcl::Region& rRegion )
501 rRegion.Intersect( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
502 Size( mnOutWidth, mnOutHeight ) ) );
503 if ( mpWindowImpl->mbWinRegion )
504 rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
507 void Window::ImplExcludeWindowRegion( vcl::Region& rRegion )
509 if ( mpWindowImpl->mbWinRegion )
511 Point aPoint( mnOutOffX, mnOutOffY );
512 vcl::Region aRegion( tools::Rectangle( aPoint,
513 Size( mnOutWidth, mnOutHeight ) ) );
514 aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
515 rRegion.Exclude( aRegion );
517 else
519 Point aPoint( mnOutOffX, mnOutOffY );
520 rRegion.Exclude( tools::Rectangle( aPoint,
521 Size( mnOutWidth, mnOutHeight ) ) );
525 void Window::ImplExcludeOverlapWindows( vcl::Region& rRegion ) const
527 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
528 while ( pWindow )
530 if ( pWindow->mpWindowImpl->mbReallyVisible )
532 pWindow->ImplExcludeWindowRegion( rRegion );
533 pWindow->ImplExcludeOverlapWindows( rRegion );
536 pWindow = pWindow->mpWindowImpl->mpNext;
540 void Window::ImplExcludeOverlapWindows2( vcl::Region& rRegion )
542 if ( mpWindowImpl->mbReallyVisible )
543 ImplExcludeWindowRegion( rRegion );
545 ImplExcludeOverlapWindows( rRegion );
548 void Window::ImplIntersectAndUnionOverlapWindows( const vcl::Region& rInterRegion, vcl::Region& rRegion ) const
550 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
551 while ( pWindow )
553 if ( pWindow->mpWindowImpl->mbReallyVisible )
555 vcl::Region aTempRegion( rInterRegion );
556 pWindow->ImplIntersectWindowRegion( aTempRegion );
557 rRegion.Union( aTempRegion );
558 pWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
561 pWindow = pWindow->mpWindowImpl->mpNext;
565 void Window::ImplIntersectAndUnionOverlapWindows2( const vcl::Region& rInterRegion, vcl::Region& rRegion )
567 if ( mpWindowImpl->mbReallyVisible )
569 vcl::Region aTempRegion( rInterRegion );
570 ImplIntersectWindowRegion( aTempRegion );
571 rRegion.Union( aTempRegion );
574 ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
577 void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion ) const
579 // Clip Overlap Siblings
580 vcl::Window const * pStartOverlapWindow;
581 if ( !ImplIsOverlapWindow() )
582 pStartOverlapWindow = mpWindowImpl->mpOverlapWindow;
583 else
584 pStartOverlapWindow = this;
585 while ( !pStartOverlapWindow->mpWindowImpl->mbFrame )
587 vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
588 while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) )
590 pOverlapWindow->ImplIntersectAndUnionOverlapWindows2( rInterRegion, rRegion );
591 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
593 pStartOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow;
596 // Clip Child Overlap Windows
597 if ( !ImplIsOverlapWindow() )
598 mpWindowImpl->mpOverlapWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
599 else
600 ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
603 void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Region& rRegion,
604 bool bChildren, bool bSiblings )
606 vcl::Region aRegion( rSourceRect );
607 if ( mpWindowImpl->mbWinRegion )
608 rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
609 vcl::Region aTempRegion;
610 vcl::Window* pWindow;
612 ImplCalcOverlapRegionOverlaps( aRegion, rRegion );
614 // Parent-Boundaries
615 pWindow = this;
616 if ( !ImplIsOverlapWindow() )
618 pWindow = ImplGetParent();
621 aTempRegion = aRegion;
622 pWindow->ImplExcludeWindowRegion( aTempRegion );
623 rRegion.Union( aTempRegion );
624 if ( pWindow->ImplIsOverlapWindow() )
625 break;
626 pWindow = pWindow->ImplGetParent();
628 while ( pWindow );
630 if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
632 aTempRegion = aRegion;
633 aTempRegion.Exclude( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
634 rRegion.Union( aTempRegion );
637 // Siblings
638 if ( bSiblings && !ImplIsOverlapWindow() )
640 pWindow = mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild;
643 if ( pWindow->mpWindowImpl->mbReallyVisible && (pWindow != this) )
645 aTempRegion = aRegion;
646 pWindow->ImplIntersectWindowRegion( aTempRegion );
647 rRegion.Union( aTempRegion );
649 pWindow = pWindow->mpWindowImpl->mpNext;
651 while ( pWindow );
654 if ( bChildren )
656 pWindow = mpWindowImpl->mpFirstChild;
657 while ( pWindow )
659 if ( pWindow->mpWindowImpl->mbReallyVisible )
661 aTempRegion = aRegion;
662 pWindow->ImplIntersectWindowRegion( aTempRegion );
663 rRegion.Union( aTempRegion );
665 pWindow = pWindow->mpWindowImpl->mpNext;
670 void Window::SaveBackground(VirtualDevice& rSaveDevice, const Point& rPos, const Size& rSize, const Size&) const
672 MapMode aTempMap(GetMapMode());
673 aTempMap.SetOrigin(Point());
674 rSaveDevice.SetMapMode(aTempMap);
676 if ( mpWindowImpl->mpPaintRegion )
678 vcl::Region aClip( *mpWindowImpl->mpPaintRegion );
679 const Point aPixPos( LogicToPixel( rPos ) );
681 aClip.Move( -mnOutOffX, -mnOutOffY );
682 aClip.Intersect( tools::Rectangle( aPixPos, LogicToPixel( rSize ) ) );
684 if ( !aClip.IsEmpty() )
686 const vcl::Region aOldClip( rSaveDevice.GetClipRegion() );
687 const Point aPixOffset( rSaveDevice.LogicToPixel( Point() ) );
688 const bool bMap = rSaveDevice.IsMapModeEnabled();
690 // move clip region to have the same distance to DestOffset
691 aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() );
693 // set pixel clip region
694 rSaveDevice.EnableMapMode( false );
695 rSaveDevice.SetClipRegion( aClip );
696 rSaveDevice.EnableMapMode( bMap );
697 rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
698 rSaveDevice.SetClipRegion( aOldClip );
701 else
703 rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
706 rSaveDevice.SetMapMode(MapMode());
709 } /* namespace vcl */
711 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */