Kaydet (Commit) 852d812f authored tarafından xukai liu's avatar xukai liu Kaydeden (comit) Markus Mohrhard

add algorithm of corner generated information

Including a number of Linux build fixes by Markus Mohrhard.

Change-Id: I8a019351f7dd7d48977ff10d5eb3535c2ddb9034
üst 531f283b
#define TOP_SURFACE 0
#define MIDDLE_SURFACE 1
#define BOTTOM_SURFACE 2
#define FLAT_TOP_SURFACE 3
#define FLAT_BOTTOM_SURFACE 4
static GLfloat boundBox[] = {
0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f,
0.0f, 1.0f, 1.0f,//1
0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 1.0f,
0.0f, 1.0f, 0.0f,//2
1.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f,//3
1.0f, 1.0f, 0.0f,
1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f,//4
1.0f, 0.0f, 1.0f,
0.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.0f,//5
1.0f, 0.0f, 1.0f,
0.0f, 0.0f, 1.0f,
0.0f, 0.0f, 0.0f,//6
1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 0.0f,
0.0f, 1.0f, 0.0f,//7
1.0f, 1.0f, 1.0f,
0.0f, 1.0f, 0.0f,
0.0f, 1.0f, 1.0f,//8
0.0f, 1.0f, 1.0f,
0.0f, 0.0f, 1.0f,
1.0f, 0.0f, 1.0f,//9
1.0f, 1.0f, 1.0f,
0.0f, 1.0f, 1.0f,
1.0f, 0.0f, 1.0f,//10
1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 0.0f,
1.0f, 1.0f, 0.0f,//11
1.0f, 0.0f, 0.0f,
1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 1.0f//12
};
GLfloat coordinateAxis[] = {
-1.0, 0.0, 0.0,
1.0, 0.0, 0.0,//x
0.0, 0.0, -1.0,
0.0, 0.0, 1.0,//z
0.0, 0.0, 0.0,
0.0, 1.0, 0.0//y
};
......@@ -38,6 +38,9 @@
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/awt/XBitmap.hpp>
#define ENABLE_DEBUG_PROPERTIES 0
using namespace com::sun::star;
......@@ -1143,7 +1146,8 @@ void DummyXShapes::render()
}
DummyChart::DummyChart(uno::Reference< drawing::XShape > xTarget):
m_GLRender(xTarget),
m_GLRender(),
maDrawPage(xTarget),
mbNotInit(true)
{
SAL_INFO("chart2.opengl", "DummyXShape::DummyChart()-----test: ");
......@@ -1186,8 +1190,13 @@ void DummyChart::render()
#else
DummyXShapes::render();
#endif
m_GLRender.renderToBitmap();
}
Graphic aGraphic = m_GLRender.renderToBitmap();
uno::Reference< awt::XBitmap> xBmp( aGraphic.GetXGraphic(), uno::UNO_QUERY );
uno::Reference < beans::XPropertySet > xPropSet ( maDrawPage, uno::UNO_QUERY );
xPropSet->setPropertyValue("Graphic", uno::makeAny(aGraphic.GetXGraphic()));
maDrawPage->setSize(awt::Size(m_GLRender.m_iWidth*OPENGL_SCALE_VALUE, m_GLRender.m_iHeight*OPENGL_SCALE_VALUE));
maDrawPage->setPosition(awt::Point(0,0));
}
void DummyChart::clear()
{
......
......@@ -404,6 +404,7 @@ public:
private:
TextCache maTextCache;
com::sun::star::uno::Reference< com::sun::star::drawing::XShape > maDrawPage;
public:
OpenGLRender m_GLRender;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment