diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-01-14 16:19:14 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-29 08:09:49 +0100 |
commit | ccbaca2951d858125ccc4691454ae8e90c801fe8 (patch) | |
tree | 058cd1fca731b6d787cc9ab0ccf6480af6af16d0 /chart2 | |
parent | 988e70bc809a04ddb6766995a5826c88deb4f5cd (diff) |
first fixes for rectangle rendering
Change-Id: I7705f8fd0472ad482d2292438d264eb0b641758e
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/DummyXShape.cxx | 22 | ||||
-rwxr-xr-x | chart2/source/view/main/OpenGLRender.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/OpenglShapeFactory.cxx | 1 |
3 files changed, 22 insertions, 5 deletions
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index eea1f584f615..e4e908760440 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -562,11 +562,28 @@ DummyRectangle::DummyRectangle(const awt::Size& rSize, const awt::Point& rPoint, void DummyRectangle::render() { - /* SAL_WARN("chart2.opengl", "render DummyRectangle"); debugProperties(maProperties); DummyChart* pChart = getRootShape(); - std::map< OUString, uno::Any >::const_iterator itr = maProperties.find("FillColor"); + std::map< OUString, uno::Any >::const_iterator itr = maProperties.find("Invisible"); + if(itr != maProperties.end()) + { + SAL_WARN("chart2.opengl", "invisble"); + return; + } + + itr = maProperties.find("FillStyle"); + if(itr != maProperties.end()) + { + drawing::FillStyle eStyle = itr->second.get<drawing::FillStyle>(); + if(eStyle == drawing::FillStyle_NONE) + { + SAL_WARN("chart2.opengl", "no fill style"); + return; + } + } + + itr = maProperties.find("FillColor"); if(itr != maProperties.end()) { uno::Any co = itr->second; @@ -587,7 +604,6 @@ void DummyRectangle::render() } pChart->m_GLRender.RectangleShapePoint(maPosition.X, maPosition.Y, maSize.Width, maSize.Height); pChart->m_GLRender.RenderRectangleShape(); - */ } DummyText::DummyText(const OUString& rText, const tNameSequence& rNames, diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 9bd3e49fe2e4..d540fe28098d 100755 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -1612,8 +1612,8 @@ int OpenGLRender::SetArea2DShapePoint(float x, float y, int listLength) { m_Area2DPointList.reserve(listLength); } - float actualX = (x / OPENGL_SCALE_VALUE) - ((float)m_iWidth / 2); - float actualY = (y / OPENGL_SCALE_VALUE) - ((float)m_iHeight / 2); + float actualX = (x / OPENGL_SCALE_VALUE); + float actualY = (y / OPENGL_SCALE_VALUE); m_Area2DPointList.push_back(actualX); m_Area2DPointList.push_back(actualY); m_Area2DPointList.push_back(m_fZStep); diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index 49c7947d3f97..95b9d6634a67 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -368,6 +368,7 @@ uno::Reference< drawing::XShape > OpenglShapeFactory::createInvisibleRectangle( , const awt::Size& rSize ) { dummy::DummyRectangle* pRectangle = new dummy::DummyRectangle(rSize); + pRectangle->setPropertyValue("Invisible", uno::makeAny(sal_True)); xTarget->add(pRectangle); return pRectangle; } |