diff options
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/alpha.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 50 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/bitmapex.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pngwrite.cxx | 2 |
7 files changed, 35 insertions, 35 deletions
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx index 899795675405..05207c39256f 100644 --- a/vcl/source/gdi/alpha.cxx +++ b/vcl/source/gdi/alpha.cxx @@ -95,7 +95,7 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) const BitmapColor aReplace( cReplaceTransparency ); const long nWidth = std::min( pMaskAcc->Width(), pAcc->Width() ); const long nHeight = std::min( pMaskAcc->Height(), pAcc->Height() ); - const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color(COL_WHITE) ) ); + const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( COL_WHITE ) ); for( long nY = 0; nY < nHeight; nY++ ) { diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index e631d0593999..bf670f20ffce 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -65,28 +65,28 @@ Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalett if( 1 == nBitCount ) { aPal.SetEntryCount( 2 ); - aPal[ 0 ] = Color(COL_BLACK); - aPal[ 1 ] = Color(COL_WHITE); + aPal[ 0 ] = COL_BLACK; + aPal[ 1 ] = COL_WHITE; } else if( ( 4 == nBitCount ) || ( 8 == nBitCount ) ) { aPal.SetEntryCount( 1 << nBitCount ); - aPal[ 0 ] = Color(COL_BLACK); - aPal[ 1 ] = Color(COL_BLUE); - aPal[ 2 ] = Color(COL_GREEN); - aPal[ 3 ] = Color(COL_CYAN); - aPal[ 4 ] = Color(COL_RED); - aPal[ 5 ] = Color(COL_MAGENTA); - aPal[ 6 ] = Color(COL_BROWN); - aPal[ 7 ] = Color(COL_GRAY); - aPal[ 8 ] = Color(COL_LIGHTGRAY); - aPal[ 9 ] = Color(COL_LIGHTBLUE); - aPal[ 10 ] = Color(COL_LIGHTGREEN); - aPal[ 11 ] = Color(COL_LIGHTCYAN); - aPal[ 12 ] = Color(COL_LIGHTRED); - aPal[ 13 ] = Color(COL_LIGHTMAGENTA); - aPal[ 14 ] = Color(COL_YELLOW); - aPal[ 15 ] = Color(COL_WHITE); + aPal[ 0 ] = COL_BLACK; + aPal[ 1 ] = COL_BLUE; + aPal[ 2 ] = COL_GREEN; + aPal[ 3 ] = COL_CYAN; + aPal[ 4 ] = COL_RED; + aPal[ 5 ] = COL_MAGENTA; + aPal[ 6 ] = COL_BROWN; + aPal[ 7 ] = COL_GRAY; + aPal[ 8 ] = COL_LIGHTGRAY; + aPal[ 9 ] = COL_LIGHTBLUE; + aPal[ 10 ] = COL_LIGHTGREEN; + aPal[ 11 ] = COL_LIGHTCYAN; + aPal[ 12 ] = COL_LIGHTRED; + aPal[ 13 ] = COL_LIGHTMAGENTA; + aPal[ 14 ] = COL_YELLOW; + aPal[ 15 ] = COL_WHITE; // Create dither palette if( 8 == nBitCount ) @@ -1187,7 +1187,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uInt8 nTol ) const ScopedReadAccess pReadAcc(const_cast<Bitmap&>(*this)); if (!nTol && pReadAcc && (pReadAcc->GetScanlineFormat() == ScanlineFormat::N1BitLsbPal || pReadAcc->GetScanlineFormat() == ScanlineFormat::N1BitMsbPal) - && pReadAcc->GetBestMatchingColor(Color(COL_WHITE)) == pReadAcc->GetBestMatchingColor(rTransColor)) + && pReadAcc->GetBestMatchingColor(COL_WHITE) == pReadAcc->GetBestMatchingColor(rTransColor)) { //if we're a 1 bit pixel already, and the transcolor matches the color that would replace it already, then just return a copy return *this; @@ -1201,8 +1201,8 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uInt8 nTol ) const { const long nWidth = pReadAcc->Width(); const long nHeight = pReadAcc->Height(); - const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color(COL_BLACK) ) ); - const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color(COL_WHITE) ) ); + const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( COL_BLACK ) ); + const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( COL_WHITE ) ); if( !nTol ) { @@ -1510,7 +1510,7 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) { const long nWidth = std::min( pMaskAcc->Width(), pAcc->Width() ); const long nHeight = std::min( pMaskAcc->Height(), pAcc->Height() ); - const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color(COL_WHITE) ) ); + const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( COL_WHITE ) ); BitmapColor aReplace; if( pAcc->HasPalette() ) @@ -1830,7 +1830,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) const Color aColBlack( COL_BLACK ); BitmapColor aPixel; BitmapColor aMaskPixel; - const BitmapColor aWhite( pAcc->GetBestMatchingColor( Color(COL_WHITE) ) ); + const BitmapColor aWhite( pAcc->GetBestMatchingColor( COL_WHITE ) ); const BitmapColor aBlack( pAcc->GetBestMatchingColor( aColBlack ) ); const BitmapColor aMaskBlack( pMaskAcc->GetBestMatchingColor( aColBlack ) ); @@ -1925,8 +1925,8 @@ bool Bitmap::MakeMonochrome(sal_uInt8 cThreshold) if( pWriteAcc ) { - const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) ); - const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) ); + const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( COL_BLACK ) ); + const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( COL_WHITE ) ); const long nWidth = pWriteAcc->Width(); const long nHeight = pWriteAcc->Height(); diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 0380e85ca37d..9c9b528bfe90 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -549,8 +549,8 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color const * pExtColor) if (aPalette.GetEntryCount() < (nCount - 1)) { aPalette.SetEntryCount(aPalette.GetEntryCount() + 2); - aPalette[aPalette.GetEntryCount() - 2] = Color(COL_BLACK); - aPalette[aPalette.GetEntryCount() - 1] = Color(COL_WHITE); + aPalette[aPalette.GetEntryCount() - 2] = COL_BLACK; + aPalette[aPalette.GetEntryCount() - 1] = COL_WHITE; } pWriteAcc->SetPalette(aPalette); diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index ec6b504a9e79..ea883d0be6eb 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -401,7 +401,7 @@ bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor ) if( !!aBitmap ) { - const bool bTransRotate = ( Color(COL_TRANSPARENT) == rFillColor ); + const bool bTransRotate = ( COL_TRANSPARENT == rFillColor ); if( bTransRotate ) { diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 99b5067270db..a9996b08d105 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -1774,8 +1774,8 @@ BitmapEx GDIMetaFile::ImplBmpMonoFnc( const BitmapEx& rBmpEx, const void* pBmpPa { BitmapPalette aPal( 3 ); - aPal[ 0 ] = Color(COL_BLACK); - aPal[ 1 ] = Color(COL_WHITE); + aPal[ 0 ] = COL_BLACK; + aPal[ 1 ] = COL_WHITE; aPal[ 2 ] = static_cast<const ImplBmpMonoParam*>(pBmpParam)->aColor; Bitmap aBmp( rBmpEx.GetSizePixel(), 4, &aPal ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 0a7e32a4cf6f..defecaa88642 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9500,9 +9500,9 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) // #i47395# 1 bit bitmaps occasionally have an inverted grey palette sal_uInt16 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( COL_BLACK ) ); assert( nBlackIndex == 0 || nBlackIndex == 1); - sal_uInt16 nWhiteIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color(COL_WHITE) ) ); + sal_uInt16 nWhiteIndex = pAccess->GetBestPaletteIndex( BitmapColor( COL_WHITE ) ); if( pAccess->GetPalette()[nBlackIndex] == BitmapColor( COL_BLACK ) && - pAccess->GetPalette()[nWhiteIndex] == BitmapColor( Color(COL_WHITE) ) ) + pAccess->GetPalette()[nWhiteIndex] == BitmapColor( COL_WHITE ) ) { // It is black and white if( nBlackIndex == 1 ) @@ -9573,7 +9573,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) if( aBitmap.GetBitCount() == 1 ) { aLine.append( "/ImageMask true\n" ); - sal_Int32 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color(COL_BLACK) ) ); + sal_Int32 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( COL_BLACK ) ); SAL_WARN_IF( nBlackIndex != 0 && nBlackIndex != 1, "vcl.pdfwriter", "wrong black index" ); if( nBlackIndex ) aLine.append( "/Decode[ 1 0 ]\n" ); diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx index 0448cb1dee79..b5c6178eb1bd 100644 --- a/vcl/source/gdi/pngwrite.cxx +++ b/vcl/source/gdi/pngwrite.cxx @@ -562,7 +562,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo } else { - const BitmapColor aTrans(mpMaskAccess->GetBestMatchingColor(Color(COL_WHITE))); + const BitmapColor aTrans(mpMaskAccess->GetBestMatchingColor(COL_WHITE)); Scanline pScanline = mpAccess->GetScanline( nY ); Scanline pScanlineMask = mpMaskAccess->GetScanline( nY ); |