diff options
Diffstat (limited to 'vcl/source/gdi/bitmap3.cxx')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index c400008e60b4..b2976039f86d 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -30,7 +30,6 @@ #include <vcl/opengl/OpenGLHelper.hxx> #endif #include <vcl/BitmapMonochromeFilter.hxx> -#include <vcl/BitmapMonochromeMatrixFilter.hxx> #include <BitmapScaleSuperFilter.hxx> #include <BitmapScaleConvolutionFilter.hxx> @@ -266,14 +265,6 @@ bool Bitmap::Convert( BmpConversion eConversion ) } break; - case BmpConversion::N1BitMatrix: - { - BitmapEx aBmpEx(*this); - bRet = BitmapFilter::Filter(aBmpEx, BitmapMonochromeMatrixFilter()); - *this = aBmpEx.GetBitmap(); - } - break; - case BmpConversion::N4BitGreys: bRet = ImplMakeGreyscales( 16 ); break; @@ -334,10 +325,6 @@ bool Bitmap::Convert( BmpConversion eConversion ) } break; - case BmpConversion::Ghosted: - bRet = ImplConvertGhosted(); - break; - default: OSL_FAIL( "Bitmap::Convert(): Unsupported conversion" ); break; @@ -680,80 +667,6 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color const * pExtColor) return bRet; } -bool Bitmap::ImplConvertGhosted() -{ - Bitmap aNewBmp; - ScopedReadAccess pR(*this); - bool bRet = false; - - if( pR ) - { - if( pR->HasPalette() ) - { - BitmapPalette aNewPal( pR->GetPaletteEntryCount() ); - - for( long i = 0, nCount = aNewPal.GetEntryCount(); i < nCount; i++ ) - { - const BitmapColor& rOld = pR->GetPaletteColor( static_cast<sal_uInt16>(i) ); - aNewPal[ static_cast<sal_uInt16>(i) ] = BitmapColor( ( rOld.GetRed() >> 1 ) | 0x80, - ( rOld.GetGreen() >> 1 ) | 0x80, - ( rOld.GetBlue() >> 1 ) | 0x80 ); - } - - aNewBmp = Bitmap( GetSizePixel(), GetBitCount(), &aNewPal ); - BitmapScopedWriteAccess pW(aNewBmp); - - if( pW ) - { - pW->CopyBuffer( *pR ); - bRet = true; - } - } - else - { - aNewBmp = Bitmap( GetSizePixel(), 24 ); - - BitmapScopedWriteAccess pW(aNewBmp); - - if( pW ) - { - const long nWidth = pR->Width(), nHeight = pR->Height(); - - for( long nY = 0; nY < nHeight; nY++ ) - { - Scanline pScanline = pW->GetScanline(nY); - Scanline pScanlineRead = pR->GetScanline(nY); - for( long nX = 0; nX < nWidth; nX++ ) - { - const BitmapColor aOld( pR->GetPixelFromData( pScanlineRead, nX ) ); - pW->SetPixelOnData( pScanline, nX, BitmapColor( ( aOld.GetRed() >> 1 ) | 0x80, - ( aOld.GetGreen() >> 1 ) | 0x80, - ( aOld.GetBlue() >> 1 ) | 0x80 ) ); - - } - } - - bRet = true; - } - } - - pR.reset(); - } - - if( bRet ) - { - const MapMode aMap( maPrefMapMode ); - const Size aSize( maPrefSize ); - - *this = aNewBmp; - - maPrefMapMode = aMap; - maPrefSize = aSize; - } - - return bRet; -} - bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) { if(basegfx::fTools::equalZero(rScaleX) || basegfx::fTools::equalZero(rScaleY)) |