[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - chart2/source
weigao
weigao at multicorewareinc.com
Sun May 25 03:14:27 PDT 2014
chart2/source/view/main/GL3DRenderer.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 74544a356a5f69afe148405139ac783150e1b322
Author: weigao <weigao at multicorewareinc.com>
Date: Sun May 25 13:47:44 2014 +0800
fix the bar model generate
Change-Id: I8df87b27dd93f0e11198998869b97754ded3bca1
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 75628da..a658536 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -329,7 +329,7 @@ void OpenGL3DRenderer::CreateActualRoundedCube(float fRadius, int iSubDivY, int
{
return;
}
- float topThreshold = height - 2 * fRadius;
+ float topThreshold = depth - 2 * fRadius;
float bottomThreshold = fRadius;
std::vector<glm::vec3> vertices;
@@ -1002,7 +1002,8 @@ void OpenGL3DRenderer::AddShape3DExtrudeObject(bool roundedCorner, sal_uInt32 nC
m_Extrude3DInfo.rounded = roundedCorner;
if (m_Extrude3DInfo.rounded && (m_RoundBarMesh.iMeshSizes == 0))
{
- CreateActualRoundedCube(0.1f, 30, 30, 1.0f, m_Extrude3DInfo.yScale / m_Extrude3DInfo.xScale, 1.2f);
+ float radius = 0.2f;
+ CreateActualRoundedCube(radius, 30, 30, 1.0f, m_Extrude3DInfo.yScale / m_Extrude3DInfo.xScale, 1 + 2 * radius);
AddVertexData(m_CubeVertexBuf);
AddNormalData(m_CubeNormalBuf);
AddIndexData(m_CubeElementBuf);
@@ -1197,7 +1198,6 @@ void OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D)
PosVecf3 trans = {extrude3D.xTransform,
extrude3D.yTransform,
extrude3D.zTransform};
-
if (actualZTrans < 0.0f)
{
// the height of rounded corner is higher than the cube than use the org scale matrix
More information about the Libreoffice-commits
mailing list