[Libreoffice-commits] core.git: Branch 'private/moggi/debug-opengl' - 2 commits - chart2/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Jan 12 05:43:19 PST 2014


 chart2/source/view/main/OpenGLRender.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit fd4d9bfa56f77bd32180110025914ad85895b5ce
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Jan 12 14:42:18 2014 +0100

    ahh, think error
    
    Change-Id: I400115ad802c1d00ec5f99e4f5fc952938de450a

diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index e3868b6..ae784f2 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -551,7 +551,7 @@ int OpenGLRender::SetLine2DShapePoint(float x, float y, int listLength)
     m_fPicBottom = std::min(m_fPicBottom, actualY);
     m_fPicTop = std::max(m_fPicTop, actualY);
 
-    if (m_Line2DPointList.size() == size_t((listLength * 3) - 1))
+    if (m_Line2DPointList.size() == size_t(listLength * 3))
     {
         m_Line2DShapePointList.push_back(m_Line2DPointList);
     }
@@ -1648,7 +1648,7 @@ int OpenGLRender::SetArea2DShapePoint(float x, float y, int listLength)
     m_fPicBottom = std::min(m_fPicBottom, actualY);
     m_fPicTop = std::max(m_fPicTop, actualY);
 
-    if (m_Area2DPointList.size() == size_t((listLength * 3) -1))
+    if (m_Area2DPointList.size() == size_t(listLength * 3))
     {
         m_Area2DShapePointList.push_back(m_Area2DPointList);
     }
commit 4b039738da3366239a69c3efa69091a51fbc7abc
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Jan 12 14:40:11 2014 +0100

    fix code for writting png files
    
    Change-Id: I96244b99b2f5a9f22ca09c133687661b06229359

diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index a5592d9..e3868b6 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -45,9 +45,13 @@ using namespace com::sun::star;
 using namespace std;
 
 #define RENDER_TO_FILE 0
-#define DEBUG_PNG 0
+#define DEBUG_PNG 1
 #define BMP_HEADER_LEN 54
 
+#if DEBUG_PNG
+#include <vcl/pngwrite.hxx>
+#endif
+
 #define OPENGL_SHADER( ... )# __VA_ARGS__
 
 #define GL_PI 3.14159f


More information about the Libreoffice-commits mailing list