diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-15 20:39:27 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-16 21:57:15 +0900 |
commit | a6c85d74ea03b35f03217daad9869f4458aa0c0f (patch) | |
tree | 30420d2cb105e31496426b071bfe349ca60ea6bc /desktop/source/splash | |
parent | 264fb9f16336e2cfd8f937b630fc167faab0aae3 (diff) |
refactor desktop classes to use RenderContext
Change-Id: I2338733e76968aeb69a57c60edd9d04d29e8321c
Diffstat (limited to 'desktop/source/splash')
-rw-r--r-- | desktop/source/splash/splash.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index c99c3a2240c2..6794d15cfd56 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -605,32 +605,32 @@ void SplashScreen::determineProgressRatioValues( } } -void SplashScreenWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&) +void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { if (!pSpl || !pSpl->_bVisible) return; //native drawing // in case of native controls we need to draw directly to the window - if( pSpl->_bNativeProgress && IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) ) + if (pSpl->_bNativeProgress && rRenderContext.IsNativeControlSupported(CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL)) { - DrawBitmapEx( Point(), pSpl->_aIntroBmp ); + rRenderContext.DrawBitmapEx(Point(), pSpl->_aIntroBmp); ImplControlValue aValue( pSpl->_iProgress * pSpl->_barwidth / pSpl->_iMax); - Rectangle aDrawRect( Point(pSpl->_tlx, pSpl->_tly), Size( pSpl->_barwidth, pSpl->_barheight ) ); + Rectangle aDrawRect( Point(pSpl->_tlx, pSpl->_tly), Size( pSpl->_barwidth, pSpl->_barheight)); Rectangle aNativeControlRegion, aNativeContentRegion; - if( GetNativeControlRegion( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect, - ControlState::ENABLED, aValue, OUString(), - aNativeControlRegion, aNativeContentRegion ) ) + if (rRenderContext.GetNativeControlRegion(CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect, + ControlState::ENABLED, aValue, OUString(), + aNativeControlRegion, aNativeContentRegion)) { long nProgressHeight = aNativeControlRegion.GetHeight(); aDrawRect.Top() -= (nProgressHeight - pSpl->_barheight)/2; aDrawRect.Bottom() += (nProgressHeight - pSpl->_barheight)/2; } - if( (DrawNativeControl( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect, - ControlState::ENABLED, aValue, pSpl->_sProgressText )) ) + if ((rRenderContext.DrawNativeControl(CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect, + ControlState::ENABLED, aValue, pSpl->_sProgressText))) { return; } @@ -639,7 +639,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rec // non native drawing // draw bitmap if (pSpl->_bPaintBitmap) - _vdev->DrawBitmapEx( Point(), pSpl->_aIntroBmp ); + _vdev->DrawBitmapEx(Point(), pSpl->_aIntroBmp); if (pSpl->_bPaintProgress) { // draw progress... @@ -660,7 +660,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rec _vdev->SetTextColor(pSpl->_cProgressTextColor); _vdev->DrawText(Point(pSpl->_tlx, pSpl->_textBaseline), pSpl->_sProgressText); } - DrawOutDev(Point(), GetOutputSizePixel(), Point(), _vdev->GetOutputSizePixel(), *_vdev.get() ); + rRenderContext.DrawOutDev(Point(), rRenderContext.GetOutputSizePixel(), Point(), _vdev->GetOutputSizePixel(), *_vdev.get()); } |