Kaydet (Commit) d9f93ced authored tarafından Markus Mohrhard's avatar Markus Mohrhard

extract the rendering code in ChartView

We need it for the IOpenGLRenderer interface.

Change-Id: Ic9f425b44c0efdd30956eba13ef03ba7179d35a4
üst e7da55b6
...@@ -214,6 +214,8 @@ private: //methods ...@@ -214,6 +214,8 @@ private: //methods
void impl_updateView(); void impl_updateView();
void render();
::com::sun::star::awt::Rectangle impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer ::com::sun::star::awt::Rectangle impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer
, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes>& xDiagramPlusAxes_Shapes , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes>& xDiagramPlusAxes_Shapes
, const ::com::sun::star::awt::Point& rAvailablePos , const ::com::sun::star::awt::Point& rAvailablePos
......
...@@ -2615,13 +2615,7 @@ void ChartView::createShapes() ...@@ -2615,13 +2615,7 @@ void ChartView::createShapes()
//cleanup: remove all empty group shapes to avoid grey border lines: //cleanup: remove all empty group shapes to avoid grey border lines:
lcl_removeEmptyGroupShapes( mxRootShape ); lcl_removeEmptyGroupShapes( mxRootShape );
OpenGLWindow* pWindow = mrChartModel.getOpenGLWindow(); render();
bool bRender = pShapeFactory->preRender(pWindow);
if(bRender)
{
pShapeFactory->render(mxRootShape);
pShapeFactory->postRender(pWindow);
}
if(maTimeBased.bTimeBased && maTimeBased.nFrame % 60 == 0) if(maTimeBased.bTimeBased && maTimeBased.nFrame % 60 == 0)
{ {
...@@ -2676,6 +2670,18 @@ void ChartView::createShapes() ...@@ -2676,6 +2670,18 @@ void ChartView::createShapes()
} }
} }
void ChartView::render()
{
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);
OpenGLWindow* pWindow = mrChartModel.getOpenGLWindow();
bool bRender = pShapeFactory->preRender(pWindow);
if(bRender)
{
pShapeFactory->render(mxRootShape);
pShapeFactory->postRender(pWindow);
}
}
// util::XEventListener (base of XCloseListener) // util::XEventListener (base of XCloseListener)
void SAL_CALL ChartView::disposing( const lang::EventObject& /* rSource */ ) void SAL_CALL ChartView::disposing( const lang::EventObject& /* rSource */ )
throw(uno::RuntimeException, std::exception) throw(uno::RuntimeException, std::exception)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment