summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-03-23 22:31:36 +1100
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-03-24 11:52:50 +0000
commiteb5242851d8242fbadca7ac8fde7b633b207ba90 (patch)
tree33968bd5cd93509fca434510e9dd2df05915a7c8 /vcl
parent5e3aa91c77374b555277964b6707252bdc12ac21 (diff)
fdo#74702 GetPaintArea protected function introduced
GetPaintArea has been introduced for Window - we intersect with the available paintable boundary to get the actual paintable area needed. For OutputDevice, GetPaintArea just returns the same area. Change-Id: If38b09eb54d516d189cedf8bba15b184e6b6f7d5 Reviewed-on: https://gerrit.libreoffice.org/8727 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/outdev2.cxx13
-rw-r--r--vcl/source/window/window.cxx10
2 files changed, 16 insertions, 7 deletions
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
index 51ee4834ad57..06593b7e95c0 100644
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -1992,6 +1992,11 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
return res;
}
+Rectangle& OutputDevice::GetPaintArea( Rectangle& rDstRect )
+{
+ return rDstRect;
+}
+
void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
@@ -2003,13 +2008,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
const bool bHMirr = aOutSz.Width() < 0;
const bool bVMirr = aOutSz.Height() < 0;
- if( OUTDEV_WINDOW == meOutDevType )
- {
- const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() );
-
- if( !aPaintRgn.IsNull() )
- aDstRect.Intersection( LogicToPixel( aPaintRgn.GetBoundRect() ) );
- }
+ aDstRect = GetPaintArea(aDstRect);
if( bHMirr )
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 1e6a339caf2c..49716ed8fa37 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -446,6 +446,16 @@ void Window::CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags )
OutputDevice::CopyAreaFinal(aPosAry, nFlags);
}
+Rectangle& Window::GetPaintArea( Rectangle& rDstRect )
+{
+ const Region aPaintRgn( GetPaintRegion() );
+
+ if( !aPaintRgn.IsNull() )
+ rDstRect.Intersection( LogicToPixel( aPaintRgn.GetBoundRect() ) );
+
+ return rDstRect;
+}
+
void Window::ImplReleaseGraphics( bool bRelease )
{
DBG_TESTSOLARMUTEX();