include/vcl/outdev.hxx | 1 + include/vcl/window.hxx | 1 + vcl/source/gdi/outdev2.cxx | 13 ++++++------- vcl/source/window/window.cxx | 10 ++++++++++ 4 files changed, 18 insertions(+), 7 deletions(-)
New commits: commit eb5242851d8242fbadca7ac8fde7b633b207ba90 Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Sun Mar 23 22:31:36 2014 +1100 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 <nthieb...@gmail.com> Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com> diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index e82cb1d..c1ac7f3 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 007cf88..d41f0f5 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 51ee483..06593b7 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 1e6a339..49716ed 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits