summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-05-07 15:47:17 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-05-07 21:23:54 +0200
commit66d02a560469aa42990b2eff0fe9bce1f82dc21a (patch)
treef0a5892c7dcefae263e76ccd3947e99ba3a727e2 /chart2
parent62b71e9ad3b7e3b2e6dd6c872b6c5d806859bd0f (diff)
set the size to context and renderer before rendering
Change-Id: I2945a7b8647d0a40270b1e65cde2a0eb936ab1d1
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx3
-rw-r--r--chart2/source/view/inc/GL3DRenderer.hxx4
2 files changed, 5 insertions, 2 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 9c4264d06e2b..e21a34b87e92 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -67,6 +67,9 @@ void GL3DBarChart::create3DShapes()
void GL3DBarChart::render()
{
mrWindow.getContext()->makeCurrent();
+ Size aSize = mrWindow.GetSizePixel();
+ mpRenderer->SetSize(aSize);
+ mrWindow.getContext()->setWinSize(aSize);
for(boost::ptr_vector<opengl3D::Renderable3DObject>::iterator itr = maShapes.begin(),
itrEnd = maShapes.end(); itr != itrEnd; ++itr)
{
diff --git a/chart2/source/view/inc/GL3DRenderer.hxx b/chart2/source/view/inc/GL3DRenderer.hxx
index 1df5ea1b9019..81c93151a1ce 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -249,9 +249,9 @@ private:
double m_dFreq;
#endif
- int m_iWidth;
+ sal_Int32 m_iWidth;
- int m_iHeight;
+ sal_Int32 m_iHeight;
float m_fZmax;