summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-03-06 16:59:38 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-03-06 19:17:53 +0100
commit1ba322b968c4060a40c44e2f6dd910ad3e2e8419 (patch)
tree232c84efc34386df9094a47a3ef76b8066887308 /chart2
parent58274bb9c1d231c804319ef337fc412ece2f9f8c (diff)
fix the translation angle calculation
Change-Id: If4b392f5f8dc4e67d00c6000dcf48a6c1f30db36
Diffstat (limited to 'chart2')
-rwxr-xr-xchart2/source/view/main/OpenGLRender.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index dff7ff97f6be..7c8932d51951 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -1298,7 +1298,7 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, const awt::Point&
}
TextInfo aTextInfo;
- aTextInfo.rotation = -(double)rotation * GL_PI / 18000.0f;
+ aTextInfo.rotation = -(double)rotation / 360.0 * 2* GL_PI;
aTextInfo.vertex[0] = rTrans.Line1.Column3 / OPENGL_SCALE_VALUE;
aTextInfo.vertex[1] = rTrans.Line2.Column3 / OPENGL_SCALE_VALUE;
aTextInfo.vertex[2] = m_fZStep;
@@ -1351,7 +1351,7 @@ int OpenGLRender::RenderTextShape()
{
SAL_WARN("chart2.opengl", "rotation: " << textInfo.rotation);
}
- PosVecf3 angle = {0.0f, float(textInfo.rotation), float(textInfo.rotation)};
+ PosVecf3 angle = {0.0f, 0.0f, float(textInfo.rotation)};
PosVecf3 scale = {1.0, 1.0, 1.0f};
MoveModelf(trans, angle, scale);
m_MVP = m_Projection * m_View * m_Model;