diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-24 15:35:30 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-05-24 17:38:06 +0200 |
commit | ead6136ba9a5eff7df2c7f094e8fc4d3f5d2428f (patch) | |
tree | 8e05b475e740e4be30a81b608369ed2124b61540 /chart2 | |
parent | 72dcc910a07ea1392c243dbf44674622bf79b871 (diff) |
add text on both sides of the chart
Change-Id: I12d5f5e92bf908bc6d8fbd0e88293e1fcaa31c96
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 6d0b6d780e1c..7a3d3111bc97 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -190,6 +190,18 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer aBottomRight.x = nXPos; aBottomRight.y = nYPos + 0.5 * nBarDistanceY; p->setPosition(aTopLeft, aTopRight, aBottomRight); + + // create shapes on other side as well + + maShapes.push_back(new opengl3D::Text(mpRenderer.get(), aCats[i], nId++)); + p = static_cast<opengl3D::Text*>(&maShapes.back()); + aTopLeft.x = nXPos + TEXT_HEIGHT; + aTopLeft.y = - 0.5 * nBarDistanceY; + aTopRight = aTopLeft; + aTopRight.y = -calculateTextWidth(aCats[i]) - 0.5* nBarDistanceY; + aBottomRight.x = nXPos; + aBottomRight.y = -calculateTextWidth(aCats[i]) - 0.5 * nBarDistanceY; + p->setPosition(aTopLeft, aTopRight, aBottomRight); } } |