diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-06-06 08:58:13 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-06-06 09:03:16 +0300 |
commit | 96a5733e6c75646e83f9c9a2012e486fbe6d0d96 (patch) | |
tree | 22fa8117a82a4fb30795e435f97f87a6f4464c04 /src | |
parent | 52d407bb05bfc19601c4e31455b7886a98fabdd8 (diff) |
Fix missing axis titles with zero rotation and fixed titles
Change-Id: I026578b224772fe9d96f6f7789e253d433690091
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/datavisualization/engine/abstract3drenderer.cpp | 3 | ||||
-rw-r--r-- | src/datavisualization/engine/bars3drenderer.cpp | 15 | ||||
-rw-r--r-- | src/datavisualization/engine/scatter3drenderer.cpp | 15 | ||||
-rw-r--r-- | src/datavisualization/engine/surface3drenderer.cpp | 15 |
4 files changed, 25 insertions, 23 deletions
diff --git a/src/datavisualization/engine/abstract3drenderer.cpp b/src/datavisualization/engine/abstract3drenderer.cpp index 5d97a6ca..04ede782 100644 --- a/src/datavisualization/engine/abstract3drenderer.cpp +++ b/src/datavisualization/engine/abstract3drenderer.cpp @@ -640,8 +640,8 @@ void Abstract3DRenderer::drawAxisTitleX(const QVector3D &labelRotation, Qt::AlignmentFlag alignment = Qt::AlignTop; if (m_yFlipped) { alignment = Qt::AlignBottom; + zRotation = 180.0f; if (m_zFlipped) { - zRotation = 180.0f; titleOffset = -titleOffset; if (m_xFlipped) { offsetRotation = -offsetRotation; @@ -650,7 +650,6 @@ void Abstract3DRenderer::drawAxisTitleX(const QVector3D &labelRotation, xRotation = -90.0f - labelRotation.z(); } } else { - zRotation = 180.0f; yRotation = 180.0f; if (m_xFlipped) { offsetRotation = -offsetRotation; diff --git a/src/datavisualization/engine/bars3drenderer.cpp b/src/datavisualization/engine/bars3drenderer.cpp index 04b7f18f..689f3f5d 100644 --- a/src/datavisualization/engine/bars3drenderer.cpp +++ b/src/datavisualization/engine/bars3drenderer.cpp @@ -2009,15 +2009,16 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer QVector3D labelRotation; if (labelAutoAngle == 0.0f) { - labelRotation.setX(-90.0f); if (m_zFlipped) labelRotation.setY(180.0f); if (m_yFlipped) { if (m_zFlipped) - labelRotation.setY(0.0f); - else labelRotation.setY(180.0f); - labelRotation.setZ(180.0f); + else + labelRotation.setY(0.0f); + labelRotation.setX(90.0f); + } else { + labelRotation.setX(-90.0f); } } else { if (m_zFlipped) @@ -2131,10 +2132,10 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer labelRotation.setY(-90.0f); if (m_yFlipped) { if (m_xFlipped) - labelRotation.setY(90.0f); - else labelRotation.setY(-90.0f); - labelRotation.setZ(180.0f); + else + labelRotation.setY(90.0f); + labelRotation.setX(90.0f); } } else { if (m_xFlipped) diff --git a/src/datavisualization/engine/scatter3drenderer.cpp b/src/datavisualization/engine/scatter3drenderer.cpp index a6c8e004..26c393bd 100644 --- a/src/datavisualization/engine/scatter3drenderer.cpp +++ b/src/datavisualization/engine/scatter3drenderer.cpp @@ -1536,15 +1536,16 @@ void Scatter3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCa if (m_yFlipped) labelYTrans = -labelYTrans; if (labelAutoAngle == 0.0f) { - labelRotation.setX(-90.0f); if (m_zFlipped) labelRotation.setY(180.0f); if (m_yFlipped) { if (m_zFlipped) - labelRotation.setY(0.0f); - else labelRotation.setY(180.0f); - labelRotation.setZ(180.0f); + else + labelRotation.setY(0.0f); + labelRotation.setX(90.0f); + } else { + labelRotation.setX(-90.0f); } } else { if (m_zFlipped) @@ -1664,10 +1665,10 @@ void Scatter3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCa labelRotation.setY(-90.0f); if (m_yFlipped) { if (m_xFlipped) - labelRotation.setY(90.0f); - else labelRotation.setY(-90.0f); - labelRotation.setZ(180.0f); + else + labelRotation.setY(90.0f); + labelRotation.setX(90.0f); } } else { if (m_xFlipped) diff --git a/src/datavisualization/engine/surface3drenderer.cpp b/src/datavisualization/engine/surface3drenderer.cpp index 858f0283..e4dfebfc 100644 --- a/src/datavisualization/engine/surface3drenderer.cpp +++ b/src/datavisualization/engine/surface3drenderer.cpp @@ -1838,15 +1838,16 @@ void Surface3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCa if (m_yFlipped) labelYTrans = -labelYTrans; if (labelAutoAngle == 0.0f) { - labelRotation.setX(-90.0f); if (m_zFlipped) labelRotation.setY(180.0f); if (m_yFlipped) { if (m_zFlipped) - labelRotation.setY(0.0f); - else labelRotation.setY(180.0f); - labelRotation.setZ(180.0f); + else + labelRotation.setY(0.0f); + labelRotation.setX(90.0f); + } else { + labelRotation.setX(-90.0f); } } else { if (m_zFlipped) @@ -1962,10 +1963,10 @@ void Surface3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCa labelRotation.setY(-90.0f); if (m_yFlipped) { if (m_xFlipped) - labelRotation.setY(90.0f); - else labelRotation.setY(-90.0f); - labelRotation.setZ(180.0f); + else + labelRotation.setY(90.0f); + labelRotation.setX(90.0f); } } else { if (m_xFlipped) |