summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-01 15:04:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-02 07:45:28 +0000
commit52360bf8dd567598593cb212ac85f0c919315618 (patch)
treea97967592055bbd07abf983db840a8b2ead77c77 /vcl/source
parentba9b66eecf9ced0d890ff9d6b7a6efda35825382 (diff)
convert BmpCombine to scoped enum and drop unused
Change-Id: Ic67474683a25a25e5753777f4bbbeded6ceba414 Reviewed-on: https://gerrit.libreoffice.org/33793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-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;