summaryrefslogtreecommitdiff
path: root/tools/source/generic/color.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-31 23:49:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-31 23:49:35 +0100
commitef6add9a7e0bcba1fb039afb75d62e753fa37949 (patch)
tree2f4bcee1cbcb97e6015995b7edd0d9087289a54e /tools/source/generic/color.cxx
parentd4d26018402aaa75fcb6524f5c7d99fcd9c5be45 (diff)
callcatcher: remove unused code
Diffstat (limited to 'tools/source/generic/color.cxx')
-rw-r--r--tools/source/generic/color.cxx49
1 files changed, 0 insertions, 49 deletions
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 5560e631767a..114f395e7786 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -259,55 +259,6 @@ ColorData Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
return RGB_COLORDATA( cR, cG, cB );
}
-// -----------------------------------------------------------------------
-
-// CMYK values from 0 to 1
-ColorData Color::CMYKtoRGB( double fCyan, double fMagenta, double fYellow, double fKey )
-{
- fCyan = (fCyan * ( 1.0 - fKey )) + fKey;
- fMagenta = (fMagenta * ( 1.0 - fKey )) + fKey;
- fYellow = (fYellow * ( 1.0 - fKey )) + fKey;
-
- sal_uInt8 nRed = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fCyan ) * 255.0, 255.0), 0.0 ) );
- sal_uInt8 nGreen = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fMagenta ) * 255.0, 255.0), 0.0 ) );
- sal_uInt8 nBlue = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fYellow ) * 255.0, 255.0), 0.0 ) );
-
- return RGB_COLORDATA( nRed, nGreen, nBlue );
-}
-
-// -----------------------------------------------------------------------
-
-// RGB values from 0 to 255
-// CMY results from 0 to 1
-void Color::RGBtoCMYK( double& fCyan, double& fMagenta, double& fYellow, double& fKey )
-{
- fCyan = 1 - ( GetRed() / 255.0 );
- fMagenta = 1 - ( GetGreen() / 255.0 );
- fYellow = 1 - ( GetBlue() / 255.0 );
-
- //CMYK and CMY values from 0 to 1
- fKey = 1.0;
- if( fCyan < fKey ) fKey = fCyan;
- if( fMagenta < fKey ) fKey = fMagenta;
- if( fYellow < fKey ) fKey = fYellow;
-
- if ( fKey == 1.0 )
- {
- //Black
- fCyan = 0.0;
- fMagenta = 0.0;
- fYellow = 0.0;
- }
- else
- {
- fCyan = ( fCyan - fKey ) / ( 1.0 - fKey );
- fMagenta = ( fMagenta - fKey ) / ( 1.0 - fKey );
- fYellow = ( fYellow - fKey ) / ( 1.0 - fKey );
- }
-}
-
-// -----------------------------------------------------------------------
-
SvStream& Color::Read( SvStream& rIStm, sal_Bool bNewFormat )
{
if ( bNewFormat )