[Libreoffice-commits] core.git: 2 commits - chart2/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Wed Apr 9 15:14:02 PDT 2014
chart2/source/view/charttypes/3DBarChart.cxx | 3 +-
chart2/source/view/inc/3DChartObjects.hxx | 18 ++++++++++++--
chart2/source/view/main/3DChartObjects.cxx | 34 ++++++++++++++++++++++++++-
3 files changed, 51 insertions(+), 4 deletions(-)
New commits:
commit b7c7bd3de0fdadaf5e4769e0759d68ad17fb7bd0
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Thu Apr 10 00:04:35 2014 +0200
add teh rounded corners property back
This has been removed because it was unused.
Change-Id: If8fdf87cec1cd5fb5ee1924396643b152e6f3431
diff --git a/chart2/source/view/inc/3DChartObjects.hxx b/chart2/source/view/inc/3DChartObjects.hxx
index 9ce44a4..edcd273 100644
--- a/chart2/source/view/inc/3DChartObjects.hxx
+++ b/chart2/source/view/inc/3DChartObjects.hxx
@@ -35,7 +35,10 @@ class Bar : public Renderable3DObject
{
public:
Bar( const glm::mat4& rPosition, sal_uInt32 nId );
+
+ virtual void render() SAL_OVERRIDE;
private:
+ bool mbRoundedCorners;
glm::mat4 maPos;
Color maColor; // RGBA fill color
};
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index 3c11bc6..22eadae 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -29,6 +29,11 @@ Bar::Bar(const glm::mat4& rPosition, sal_uInt32 nId):
{
}
+void Bar::render()
+{
+ (void) mbRoundedCorners;
+}
+
Line::Line(sal_uInt32 nId):
Renderable3DObject(nId)
{
commit ceec6e1ac98999fff92d2feb6274fe0de9b8f005
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Thu Apr 10 00:02:51 2014 +0200
make sure the unique id is set correctly
Change-Id: I1b846e79c2fdd718b7c67f39cb67ca2916520cb3
diff --git a/chart2/source/view/charttypes/3DBarChart.cxx b/chart2/source/view/charttypes/3DBarChart.cxx
index 13e3faf..68f612c 100644
--- a/chart2/source/view/charttypes/3DBarChart.cxx
+++ b/chart2/source/view/charttypes/3DBarChart.cxx
@@ -38,6 +38,7 @@ void Bar3DChart::create3DShapes()
maShapes.clear();
maShapes.push_back(new opengl3D::Camera());
sal_Int32 nSeriesIndex = 0;
+ sal_uInt32 nId = 1;
for(std::vector<VDataSeries*>::const_iterator itr = maDataSeries.begin(),
itrEnd = maDataSeries.end(); itr != itrEnd; ++itr)
{
@@ -53,7 +54,7 @@ void Bar3DChart::create3DShapes()
glm::scale(aBarPosition, nBarSizeX, nBarSizeY, nVal);
glm::translate(aBarPosition, nXPos, nYPos, nVal/2);
- maShapes.push_back(new opengl3D::Bar(aBarPosition));
+ maShapes.push_back(new opengl3D::Bar(aBarPosition, nId++));
}
++nSeriesIndex;
diff --git a/chart2/source/view/inc/3DChartObjects.hxx b/chart2/source/view/inc/3DChartObjects.hxx
index 06121f4..9ce44a4 100644
--- a/chart2/source/view/inc/3DChartObjects.hxx
+++ b/chart2/source/view/inc/3DChartObjects.hxx
@@ -21,16 +21,20 @@ namespace opengl3D {
class Renderable3DObject
{
public:
+ Renderable3DObject(sal_uInt32 nId);
virtual ~Renderable3DObject() {};
- virtual void render() {}
+ virtual void render();
+
+protected:
+ sal_uInt32 mnUniqueId;
};
class Bar : public Renderable3DObject
{
public:
- Bar( const glm::mat4& rPosition );
+ Bar( const glm::mat4& rPosition, sal_uInt32 nId );
private:
glm::mat4 maPos;
Color maColor; // RGBA fill color
@@ -38,6 +42,9 @@ private:
class Line : public Renderable3DObject
{
+public:
+ Line( sal_uInt32 nId );
+
private:
glm::vec3 maPosBegin;
glm::vec3 maPosEnd;
@@ -46,6 +53,8 @@ private:
class Text : public Renderable3DObject
{
+public:
+ Text( sal_uInt32 nId );
private:
BitmapEx maText;
glm::vec3 maTopLeft;
@@ -55,6 +64,8 @@ private:
class Rectangle : public Renderable3DObject
{
+public:
+ Rectangle( sal_uInt32 nId );
private:
glm::vec3 maTopLeft;
glm::vec3 maTopRight;
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index 41dc086..3c11bc6 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -13,12 +13,39 @@ namespace chart {
namespace opengl3D {
-Bar::Bar(const glm::mat4& rPosition):
+Renderable3DObject::Renderable3DObject(sal_uInt32 nId):
+ mnUniqueId(nId)
+{
+}
+
+void Renderable3DObject::render()
+{
+ (void) mnUniqueId;
+}
+
+Bar::Bar(const glm::mat4& rPosition, sal_uInt32 nId):
+ Renderable3DObject(nId),
maPos(rPosition)
{
}
+Line::Line(sal_uInt32 nId):
+ Renderable3DObject(nId)
+{
+}
+
+Text::Text(sal_uInt32 nId):
+ Renderable3DObject(nId)
+{
+}
+
+Rectangle::Rectangle(sal_uInt32 nId):
+ Renderable3DObject(nId)
+{
+}
+
Camera::Camera():
+ Renderable3DObject(0),
maPos(10,10,-10),
maDirection(glm::vec3(0,0,0)-maPos)
{
More information about the Libreoffice-commits
mailing list