diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-11 19:04:58 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-11 19:05:45 +0900 |
commit | 34f19860fcb7320b4c675df2febb043c33602d8c (patch) | |
tree | eb106b57e764ef53952cb3415a871a267bc108bc /svtools/source/toolpanel/toolpaneldrawer.cxx | |
parent | 373edbd7a3eb5eed089c1addbf5e19947bed24c9 (diff) |
refactor ToolPanelDrawer to use RenderContext
Change-Id: Iee3d2801a257f26673cae5abf5614ed4382b5e6b
Diffstat (limited to 'svtools/source/toolpanel/toolpaneldrawer.cxx')
-rw-r--r-- | svtools/source/toolpanel/toolpaneldrawer.cxx | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx index 55e9a9da0038..4b986a635aa5 100644 --- a/svtools/source/toolpanel/toolpaneldrawer.cxx +++ b/svtools/source/toolpanel/toolpaneldrawer.cxx @@ -56,10 +56,10 @@ namespace svt } - void DrawerVisualization::Paint( vcl::RenderContext& rRenderContext, const Rectangle& i_rBoundingBox ) + void DrawerVisualization::Paint(vcl::RenderContext& rRenderContext, const Rectangle& i_rBoundingBox) { Window::Paint(rRenderContext, i_rBoundingBox); - m_rDrawer.Paint(); + m_rDrawer.Paint(rRenderContext); } @@ -105,29 +105,25 @@ namespace svt } - void ToolPanelDrawer::Paint() + void ToolPanelDrawer::Paint(vcl::RenderContext& rRenderContext) { - m_pPaintDevice->SetMapMode( GetMapMode() ); - m_pPaintDevice->SetOutputSize( GetOutputSizePixel() ); - m_pPaintDevice->SetSettings( GetSettings() ); - m_pPaintDevice->SetDrawMode( GetDrawMode() ); + m_pPaintDevice->SetMapMode(rRenderContext.GetMapMode()); + m_pPaintDevice->SetOutputSize(rRenderContext.GetOutputSizePixel()); + m_pPaintDevice->SetSettings(rRenderContext.GetSettings()); + m_pPaintDevice->SetDrawMode(rRenderContext.GetDrawMode()); - const Rectangle aTextBox( impl_calcTextBoundingBox() ); - impl_paintBackground( impl_calcTitleBarBox( aTextBox ) ); + const Rectangle aTextBox(impl_calcTextBoundingBox()); + impl_paintBackground(impl_calcTitleBarBox(aTextBox)); - Rectangle aFocusBox( impl_paintExpansionIndicator( aTextBox ) ); + Rectangle aFocusBox(impl_paintExpansionIndicator(aTextBox)); - m_pPaintDevice->DrawText( aTextBox, GetText(), impl_getTextStyle() ); + m_pPaintDevice->DrawText(aTextBox, GetText(), impl_getTextStyle()); - aFocusBox.Union( aTextBox ); + aFocusBox.Union(aTextBox); aFocusBox.Left() += 2; - impl_paintFocusIndicator( aFocusBox ); + impl_paintFocusIndicator(aFocusBox); - m_aVisualization->DrawOutDev( - Point(), GetOutputSizePixel(), - Point(), GetOutputSizePixel(), - *m_pPaintDevice - ); + rRenderContext.DrawOutDev(Point(), GetOutputSizePixel(), Point(), GetOutputSizePixel(), *m_pPaintDevice); } |