summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-01-14 19:14:49 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-29 08:09:53 +0100
commit2a7538ffc0965353a41841bdcd347faa722f641c (patch)
tree3de417863b8d3ef06047b28b90b8ab8ce5547525 /chart2/source
parentf1de0fb16fcd3f200799525f32b61a63eca67cc7 (diff)
add more debugging for text rendering
Change-Id: I1cb43c8a02313acf2a48ba91e88534c17f5f86c8
Diffstat (limited to 'chart2/source')
-rwxr-xr-xchart2/source/view/main/OpenGLRender.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index a906fda12093..7673d8a8b3e6 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -1475,6 +1475,19 @@ int OpenGLRender::CreateTextTexture(::rtl::OUString textValue, sal_uInt32 color,
int bmpHeight = (aRect.Bottom() - aRect.Top() + 3) & ~3;
BitmapEx aBitmapEx(aDevice.GetBitmapEx(aRect.TopLeft(), Size(bmpWidth, bmpHeight)));
+#if DEBUG_PNG // debug PNG writing
+ static int nIdx = 0;
+ OUString aName = OUString( "file:///home/moggi/Documents/work/text" ) + OUString::number( nIdx++ ) + ".png";
+ try {
+ vcl::PNGWriter aWriter( aBitmapEx );
+ SvFileStream sOutput( aName, STREAM_WRITE );
+ aWriter.Write( sOutput );
+ sOutput.Close();
+ } catch (...) {
+ SAL_WARN("slideshow.opengl", "Error writing png to " << aName);
+ }
+#endif
+
Bitmap aBitmap (aBitmapEx.GetBitmap());
AlphaMask aAlpha (aBitmapEx.GetAlpha());
boost::scoped_array<sal_uInt8> bitmapBuf(new sal_uInt8[4* bmpWidth * bmpHeight ]);