[Libreoffice-commits] core.git: chart2/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Wed May 28 10:37:25 PDT 2014


 chart2/source/view/charttypes/GL3DBarChart.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 5695cdfdc0ab372181ff9ad63db08320fb4e70c9
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Wed May 28 19:29:54 2014 +0200

    change the bar direction for the demo
    
    Change-Id: I24e45810cb154310d8e35982e2ef100cf5746e2b

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index b129b9f..711072c 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -103,8 +103,8 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
     // guarantee they are positioned correctly.  In fact, they are guaranteed
     // to be positioned incorrectly.
 
-    const float nBarSizeX = 5.0f;
-    const float nBarSizeY = 30.0f;
+    const float nBarSizeX = 30.0f;
+    const float nBarSizeY = 5.0f;
     const float nBarDistanceX = 5.0f;
     const float nBarDistanceY = 5.0;
 
@@ -153,9 +153,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
             opengl3D::Text* p = static_cast<opengl3D::Text*>(&maShapes.back());
             glm::vec3 aTopLeft, aTopRight, aBottomRight;
             aTopRight.x = -nBarDistanceY;
-            aTopRight.y = nYPos + 0.25 * nBarSizeY;
+            aTopRight.y = nYPos + nBarDistanceY;
             aTopLeft.x = calculateTextWidth(aSeriesName) * -1.0 - nBarDistanceY;
-            aTopLeft.y = nYPos + 0.25 * nBarSizeY;
+            aTopLeft.y = nYPos + nBarDistanceY;
             aBottomRight = aTopRight;
             aBottomRight.y -= TEXT_HEIGHT;
             p->setPosition(aTopLeft, aTopRight, aBottomRight);


More information about the Libreoffice-commits mailing list