diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/OpenGLRender.cxx | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 8ab05b7d136f..79e408cf26dc 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -900,26 +900,7 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, const awt::Point& long bmpWidth = rBitmapEx.GetSizePixel().Width(); long bmpHeight = rBitmapEx.GetSizePixel().Height(); - - Bitmap aBitmap (rBitmapEx.GetBitmap()); - AlphaMask aAlpha (rBitmapEx.GetAlpha()); - boost::scoped_array<sal_uInt8> bitmapBuf(new sal_uInt8[4* bmpWidth * bmpHeight ]); - Bitmap::ScopedReadAccess pReadAccces( aBitmap ); - AlphaMask::ScopedReadAccess pAlphaReadAccess( aAlpha ); - - size_t i = 0; - for (long ny = 0; ny < bmpHeight; ny++) - { - Scanline pAScan = pAlphaReadAccess->GetScanline(ny); - for(long nx = 0; nx < bmpWidth; nx++) - { - BitmapColor aCol = pReadAccces->GetColor( ny, nx ); - bitmapBuf[i++] = aCol.GetRed(); - bitmapBuf[i++] = aCol.GetGreen(); - bitmapBuf[i++] = aCol.GetBlue(); - bitmapBuf[i++] = 255 - *pAScan++; - } - } + boost::scoped_array<sal_uInt8> bitmapBuf(OpenGLHelper::ConvertBitmapExToRGBABuffer(rBitmapEx)); TextInfo aTextInfo; aTextInfo.rotation = -(double)rotation / 360.0 * 2* GL_PI; |