diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-02-20 04:53:48 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-22 05:52:26 +0100 |
commit | 02b73e7770868bd077c1916457e199f0e57b47ec (patch) | |
tree | 03f78bd025c2df7d5e6311ead8bb1ed678910ace /chart2 | |
parent | 9eaf6ab9169b539aff219849877acb710cfcc0f6 (diff) |
setting width and height always happens together
Change-Id: I65ed326ed05474bf81d0323fe3dc61ed0d87cb4e
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/DummyXShape.cxx | 3 | ||||
-rwxr-xr-x | chart2/source/view/main/OpenGLRender.cxx | 7 | ||||
-rwxr-xr-x | chart2/source/view/main/OpenGLRender.hxx | 3 |
3 files changed, 3 insertions, 10 deletions
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 5bbc0d2251d0..986589d9f898 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -1452,8 +1452,7 @@ void SAL_CALL DummyChart::setSize( const awt::Size& aSize ) mpWindow->SetSizePixel(Size(width, height)); pWindow->SetSizePixel(Size(width, height)); DummyXShape::setSize(awt::Size(0,0)); - m_GLRender.SetWidth(width); - m_GLRender.SetHeight(height); + m_GLRender.SetSize(width, height); SAL_INFO("chart2.opengl", "DummyChart::GLRender.Width = " << width << ", GLRender.Height = " << height); } diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 9b4cd8d6fe85..bf7bcdd67225 100755 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -723,14 +723,9 @@ OpenGLRender::~OpenGLRender() } // TODO: moggi: that screws up FBO if called after buffers have been created!!!! -void OpenGLRender::SetWidth(int width) +void OpenGLRender::SetSize(int width, int height) { m_iWidth = width; - m_Projection = glm::ortho(0.f, float(m_iWidth), 0.f, float(m_iHeight), -4.f, 3.f); -} - -void OpenGLRender::SetHeight(int height) -{ m_iHeight = height; m_Projection = glm::ortho(0.f, float(m_iWidth), 0.f, float(m_iHeight), -4.f, 3.f); } diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx index b91d5f3aec99..8bcfc87559d7 100755 --- a/chart2/source/view/main/OpenGLRender.hxx +++ b/chart2/source/view/main/OpenGLRender.hxx @@ -140,8 +140,7 @@ public: ~OpenGLRender(); int InitOpenGL(GLWindow); int MoveModelf(PosVecf3 trans, PosVecf3 angle, PosVecf3 scale); - void SetWidth(int width); - void SetHeight(int height); + void SetSize(int width, int height); void Release(); #if RENDER_TO_FILE int CreateBMPHeader(sal_uInt8 *bmpHeader, int xsize, int ysize); |