summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-02-15 03:32:53 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-02-15 03:49:05 +0100
commita3dfd7f5fbcfcfb6a9c2e760d78446470c89688c (patch)
tree66a4770ae30490235a94245ab32bfb5bca54d127 /chart2
parent5c7bbb11aed16e09ba67222f53e4c2ffe5687fb3 (diff)
remove more unused code
Change-Id: I57c5bc1fd436df4e917d460a31d671e361fd47b3
Diffstat (limited to 'chart2')
-rwxr-xr-xchart2/source/view/main/OpenGLRender.cxx20
-rwxr-xr-xchart2/source/view/main/OpenGLRender.hxx7
2 files changed, 5 insertions, 22 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index f48223d4184b..e6e04cf335d9 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -1251,7 +1251,7 @@ int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill)
}
-int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, awt::Point aPos, awt::Size aSize, long rotation,
+int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, const awt::Point&, const awt::Size& aSize, long rotation,
const drawing::HomogenMatrix3& rTrans)
{
#if DEBUG_PNG // debug PNG writing
@@ -1291,9 +1291,6 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, awt::Point aPos,
}
TextInfo aTextInfo;
- aTextInfo.x = (float)(aPos.X + aSize.Width / 2);
- aTextInfo.y = (float)(aPos.Y + aSize.Height / 2);
- aTextInfo.z = m_fZStep;
aTextInfo.rotation = -(double)rotation * GL_PI / 18000.0f;
aTextInfo.vertex[0] = rTrans.Line1.Column3 / OPENGL_SCALE_VALUE;
aTextInfo.vertex[1] = rTrans.Line2.Column3 / OPENGL_SCALE_VALUE;
@@ -1314,19 +1311,7 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, awt::Point aPos,
//if has ratotion, we must re caculate the central pos
if (!rtl::math::approxEqual(0, rotation))
{
- //use left top
- double r = sqrt((double)(aSize.Width * aSize.Width + aSize.Height * aSize.Height)) / 2;
- double sinOrgAngle = aTextInfo.vertex[1] / r / 2;
- double cosOrgAngle = aTextInfo.vertex[0] / r / 2;
- double sinDiataAngle = sin(aTextInfo.rotation);
- double cosDiataAngle = cos(aTextInfo.rotation);
- double x = r * (cosOrgAngle * cosDiataAngle - sinOrgAngle * sinDiataAngle);
- double y = r * (sinOrgAngle * cosDiataAngle + cosOrgAngle * sinDiataAngle);
- double diataX = x - aTextInfo.vertex[0];
- double diataY = y - aTextInfo.vertex[1];
- aTextInfo.x = aTextInfo.x - diataX;
- aTextInfo.y = aTextInfo.y - diataY;
-
+ // handle rotation
}
CHECK_GL_ERROR();
@@ -1684,6 +1669,7 @@ int OpenGLRender::RenderSymbol2DShape(float x, float y, float , float , sal_Int3
0, // stride
(void*)0 // array buffer offset
);
+
glDrawArrays(GL_POINTS, 0, 1);
glDisableVertexAttribArray(m_SymbolVertexID);
diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx
index fb66cc37284a..cd2d8bc15810 100755
--- a/chart2/source/view/main/OpenGLRender.hxx
+++ b/chart2/source/view/main/OpenGLRender.hxx
@@ -79,9 +79,6 @@ struct RectanglePointList
struct TextInfo
{
GLuint texture;
- float x;
- float y;
- float z;
double rotation;
float vertex[12];
};
@@ -168,8 +165,8 @@ public:
int RectangleShapePoint(float x, float y, float directionX, float directionY);
int CreateTextTexture(const BitmapEx& rBitmapEx,
- com::sun::star::awt::Point aPos, com::sun::star::awt::Size aSize, long rotation,
- const com::sun::star::drawing::HomogenMatrix3& rTrans);
+ const com::sun::star::awt::Point& aPos, const com::sun::star::awt::Size& aSize,
+ long rotation, const com::sun::star::drawing::HomogenMatrix3& rTrans);
int RenderTextShape();
int SetArea2DShapePoint(float x, float y, int listLength);