summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/outdev.hxx1
-rw-r--r--include/vcl/window.hxx1
-rw-r--r--vcl/source/gdi/outdev2.cxx13
-rw-r--r--vcl/source/window/window.cxx10
4 files changed, 18 insertions, 7 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e82cb1ddb94d..c1ac7f3533c8 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -736,6 +736,7 @@ public:
SAL_DLLPRIVATE void ImplDrawAlpha ( const Bitmap& rBmp, const AlphaMask& rAlpha,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel );
+ virtual Rectangle& GetPaintArea ( Rectangle& rDstRect );
SAL_DLLPRIVATE Bitmap ImplBlend ( Bitmap aBmp,
BitmapReadAccess* pP,
BitmapReadAccess* pA,
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 007cf8888e44..d41f0f52c608 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -579,6 +579,7 @@ protected:
virtual OUString getDefaultAccessibleName() const;
virtual void CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags);
+ virtual Rectangle& GetPaintArea ( Rectangle& rDstRect );
public:
bool HasMirroredGraphics() const;
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();