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

Markus Mohrhard markus.mohrhard at googlemail.com
Wed May 14 22:35:33 PDT 2014


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

New commits:
commit fd37d0757685dfd5a19ebd262c10e5353b8f891a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 15 07:33:49 2014 +0200

    change transformation matrix

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 04c3cac..8ceb3d9 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -72,7 +72,7 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
     for (boost::ptr_vector<VDataSeries>::const_iterator itr = rDataSeriesContainer.begin(),
             itrEnd = rDataSeriesContainer.end(); itr != itrEnd; ++itr)
     {
-        nYPos = nSeriesIndex * (nBarSizeY + nBarDistanceY) + nBarSizeY;
+        nYPos = nSeriesIndex * (nBarSizeY + nBarDistanceY);
 
         const VDataSeries& rDataSeries = *itr;
         sal_Int32 nPointCount = rDataSeries.getTotalPointCount();
@@ -97,10 +97,10 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
         for(sal_Int32 nIndex = 0; nIndex < nPointCount; ++nIndex)
         {
             float nVal = rDataSeries.getYValue(nIndex);
-            float nXPos = nIndex * (nBarSizeX + nBarDistanceX) + nBarSizeX;
+            float nXPos = nIndex * (nBarSizeX + nBarDistanceX);
 
 
-            glm::mat4 aScaleMatrix = glm::scale(nBarSizeX, nBarSizeY, nVal);
+            glm::mat4 aScaleMatrix = glm::scale(nBarSizeX, nBarSizeY, 0);
             glm::mat4 aTranslationMatrix = glm::translate(nXPos, nYPos, nVal);
             glm::mat4 aBarPosition = aTranslationMatrix * aScaleMatrix;
 


More information about the Libreoffice-commits mailing list