From f47d81a059ba69f00e51b3a1a11ec7d4c17c01ad Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 29 Dec 2013 05:49:58 +0100 Subject: Revert "that code looked strange and might explain some artifacts" Apparently this code was not so strange. It looks even worse after my change. Maybe I should make it clearer that I'm just guessing right now. Where is this big black rectangle coming from? This reverts commit d55dfdb9b48196b9907a7023cb338a62bac99127. --- chart2/source/view/main/DummyXShape.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'chart2') diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 146207a84d0d..6b9d3a2469df 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -1039,12 +1039,16 @@ void DummyChart::setSize( const awt::Size& aSize ) // DummyXShape::setSize(aSize); // mpWindow->SetSizePixel(Size(aSize.Width, aSize.Height)); // pWindow->SetSizePixel(Size(aSize.Width, aSize.Height)); - mpWindow->SetSizePixel(Size(0,0)); - pWindow->SetSizePixel(Size(0,0)); + int width = aSize.Width / 10; + int height = aSize.Height / 10; + width = (width + 3) & ~3; + height = (height + 3) & ~3; + mpWindow->SetSizePixel(Size(width, height)); + pWindow->SetSizePixel(Size(width, height)); DummyXShape::setSize(awt::Size(0,0)); - m_GLRender.SetWidth(aSize.Width); - m_GLRender.SetHeight(aSize.Height); - SAL_WARN("chart2.opengl", "DummyChart::GLRender.Width = " << aSize.Width << ", GLRender.Height = " << aSize.Height); + m_GLRender.SetWidth(width); + m_GLRender.SetHeight(height); + SAL_WARN("chart2.opengl", "DummyChart::GLRender.Width = " << width << ", GLRender.Height = " << height); #endif //[mod] by gaowei end -- cgit