summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx4
-rw-r--r--vcl/source/gdi/bitmap.cxx87
2 files changed, 4 insertions, 87 deletions
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index b383439dc99d..b824a1a2edde 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -1637,11 +1637,11 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B
if ( rBitmap.GetTransparentColor() == Color( COL_WHITE ) )
{
- aMask.CombineSimple( rBitmap.GetMask(), BMP_COMBINE_OR );
+ aMask.CombineSimple( rBitmap.GetMask(), BmpCombine::Or );
}
else
{
- aMask.CombineSimple( rBitmap.GetMask(), BMP_COMBINE_AND );
+ aMask.CombineSimple( rBitmap.GetMask(), BmpCombine::And );
}
aBmpEx = BitmapEx( rBitmap.GetBitmap(), aMask );
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index ec382f267612..16aa9adf590d 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -1721,31 +1721,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
switch( eCombine )
{
- case BMP_COMBINE_COPY:
- {
- for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
- {
- if( pMaskAcc->GetPixel( nY, nX ) == aMaskBlack )
- pAcc->SetPixel( nY, nX, aBlack );
- else
- pAcc->SetPixel( nY, nX, aWhite );
- }
- }
- break;
-
- case BMP_COMBINE_INVERT:
- {
- for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
- {
- if( pAcc->GetPixel( nY, nX ) == aBlack )
- pAcc->SetPixel( nY, nX, aWhite );
- else
- pAcc->SetPixel( nY, nX, aBlack );
- }
- }
- break;
-
- case BMP_COMBINE_AND:
+ case BmpCombine::And:
{
for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
{
@@ -1757,19 +1733,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
}
break;
- case BMP_COMBINE_NAND:
- {
- for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
- {
- if( pMaskAcc->GetPixel( nY, nX ) != aMaskBlack && pAcc->GetPixel( nY, nX ) != aBlack )
- pAcc->SetPixel( nY, nX, aBlack );
- else
- pAcc->SetPixel( nY, nX, aWhite );
- }
- }
- break;
-
- case BMP_COMBINE_OR:
+ case BmpCombine::Or:
{
for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
{
@@ -1781,53 +1745,6 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
}
break;
- case BMP_COMBINE_NOR:
- {
- for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
- {
- if( pMaskAcc->GetPixel( nY, nX ) != aMaskBlack || pAcc->GetPixel( nY, nX ) != aBlack )
- pAcc->SetPixel( nY, nX, aBlack );
- else
- pAcc->SetPixel( nY, nX, aWhite );
- }
- }
- break;
-
- case BMP_COMBINE_XOR:
- {
- for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
- {
- aPixel = pAcc->GetPixel( nY, nX );
- aMaskPixel = pMaskAcc->GetPixel( nY, nX );
-
- if( ( aMaskPixel != aMaskBlack && aPixel == aBlack ) ||
- ( aMaskPixel == aMaskBlack && aPixel != aBlack ) )
- {
- pAcc->SetPixel( nY, nX, aWhite );
- }
- else
- pAcc->SetPixel( nY, nX, aBlack );
- }
- }
- break;
-
- case BMP_COMBINE_NXOR:
- {
- for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
- {
- aPixel = pAcc->GetPixel( nY, nX );
- aMaskPixel = pMaskAcc->GetPixel( nY, nX );
-
- if( ( aMaskPixel != aMaskBlack && aPixel == aBlack ) ||
- ( aMaskPixel == aMaskBlack && aPixel != aBlack ) )
- {
- pAcc->SetPixel( nY, nX, aBlack );
- }
- else
- pAcc->SetPixel( nY, nX, aWhite );
- }
- }
- break;
}
bRet = true;