summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/inc/DummyXShape.hxx2
-rw-r--r--chart2/source/view/main/DummyXShape.cxx9
-rwxr-xr-xchart2/source/view/main/OpenGLRender.cxx12
-rw-r--r--chart2/source/view/main/OpenglShapeFactory.cxx4
4 files changed, 13 insertions, 14 deletions
diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx
index 4769a3a63c9c..1d2eba689485 100644
--- a/chart2/source/view/inc/DummyXShape.hxx
+++ b/chart2/source/view/inc/DummyXShape.hxx
@@ -333,7 +333,7 @@ class DummyText : public DummyXShape
public:
DummyText(const OUString& rText, const tNameSequence& rNames,
const tAnySequence& rValues, const uno::Any& rTrans, com::sun::star::uno::Reference<
- com::sun::star::drawing::XShapes > xTarget);
+ com::sun::star::drawing::XShapes > xTarget, double nRotation);
virtual void render() SAL_OVERRIDE;
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index c359595510ad..9f8db073b96d 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -784,9 +784,10 @@ private:
}
DummyText::DummyText(const OUString& rText, const tNameSequence& rNames,
- const tAnySequence& rValues, const uno::Any& rTrans, uno::Reference< drawing::XShapes > xTarget ):
+ const tAnySequence& rValues, const uno::Any& rTrans, uno::Reference< drawing::XShapes > xTarget, double nRotation ):
maText(rText),
- maTrans(rTrans)
+ maTrans(rTrans),
+ mnRotation(nRotation)
{
setProperties(rNames, rValues, maProperties);
@@ -857,8 +858,8 @@ void DummyText::render()
{
aTransformation = maTrans.get<drawing::HomogenMatrix3>();
}
- pChart->m_GLRender.CreateTextTexture(maBitmap, maPosition, maSize, 0,
- aTransformation);
+ pChart->m_GLRender.CreateTextTexture(maBitmap, maPosition, maSize,
+ mnRotation, aTransformation);
pChart->m_GLRender.RenderTextShape();
}
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 24277b7fba18..dff7ff97f6be 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -1318,12 +1318,6 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, const awt::Point&
aTextInfo.bmpWidth = bmpWidth;
aTextInfo.bmpHeight = bmpHeight;
- //if has ratotion, we must re caculate the central pos
- if (!rtl::math::approxEqual(0, rotation))
- {
- // handle rotation
- }
-
CHECK_GL_ERROR();
glGenTextures(1, &aTextInfo.texture);
CHECK_GL_ERROR();
@@ -1353,7 +1347,11 @@ int OpenGLRender::RenderTextShape()
{
TextInfo &textInfo = m_TextInfoList.front();
PosVecf3 trans = { (float)-textInfo.bmpWidth/2.0f, (float)-textInfo.bmpHeight/2.0f, 0};
- PosVecf3 angle = {0.0f, 0.0f, float(textInfo.rotation)};
+ if(0.0 != textInfo.rotation)
+ {
+ SAL_WARN("chart2.opengl", "rotation: " << textInfo.rotation);
+ }
+ PosVecf3 angle = {0.0f, float(textInfo.rotation), float(textInfo.rotation)};
PosVecf3 scale = {1.0, 1.0, 1.0f};
MoveModelf(trans, angle, scale);
m_MVP = m_Projection * m_View * m_Model;
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index 4843fe3da66d..93e408404d84 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -403,7 +403,7 @@ uno::Reference< drawing::XShape >
, const uno::Any& rATransformation )
{
dummy::DummyText* pText = new dummy::DummyText( rText, rPropNames, rPropValues,
- rATransformation, xTarget );
+ rATransformation, xTarget, 0 );
xTarget->add(pText);
return pText;
}
@@ -451,7 +451,7 @@ uno::Reference< drawing::XShape >
aM.translate( nXPos, nYPos );
dummy::DummyText* pText = new dummy::DummyText(aString, aPropNames, aPropValues,
- uno::makeAny(B2DHomMatrixToHomogenMatrix3(aM)), xTarget);
+ uno::makeAny(B2DHomMatrixToHomogenMatrix3(aM)), xTarget, nRotation);
pText->setName(rName);
xTarget->add(pText);
return pText;