[Libreoffice-commits] .: 2 commits - slideshow/source
René Engelhard
rene at kemper.freedesktop.org
Sat Jan 1 17:15:43 PST 2011
slideshow/source/engine/color.cxx | 51 ++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
New commits:
commit 7a4fff4a87df2022db27b8e1dfa51c5cd69b1823
Merge: bb72aa1... 1b4eafb...
Author: Rene Engelhard <rene at debian.org>
Date: Sun Jan 2 01:06:39 2011 +0100
Merge remote branch 'origin/libreoffice-3-3'
Conflicts:
slideshow/source/engine/color.cxx
diff --cc slideshow/source/engine/color.cxx
index 35f3b4e,f20f17f..1bb21e3
--- a/slideshow/source/engine/color.cxx
+++ b/slideshow/source/engine/color.cxx
@@@ -228,6 -228,57 +228,57 @@@ namespace slidesho
return maHSLTriple.mnLuminance;
}
+ double HSLColor::getRed() const
+ {
+ if( ::basegfx::fTools::equalZero( getSaturation() ) )
+ return getLuminance();
+
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
++ return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
++ mnMagicValue,
+ getHue() + 120.0 );
+ }
+
+ double HSLColor::getGreen() const
+ {
+ if( ::basegfx::fTools::equalZero( getSaturation() ) )
+ return getLuminance();
+
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
++ return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
++ mnMagicValue,
+ getHue() );
+ }
+
+ double HSLColor::getBlue() const
+ {
+ if( ::basegfx::fTools::equalZero( getSaturation() ) )
+ return getLuminance();
+
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
++ return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
++ mnMagicValue,
+ getHue() - 120.0 );
+ }
+
+ RGBColor HSLColor::getRGBColor() const
+ {
+ RGBColor::RGBTriple aColor( hsl2rgb( getHue(),
+ getSaturation(),
+ getLuminance() ) );
+ return RGBColor( aColor.mnRed, aColor.mnGreen, aColor.mnBlue );
+ }
-
++
+ RGBColor::RGBColor(const RGBColor& rLHS)
+ : maRGBTriple( rLHS.maRGBTriple )
+ {
+ }
+
+ RGBColor& RGBColor::operator=( const RGBColor& rLHS ){
+
+ maRGBTriple.mnRed = rLHS.getRed();
+ maRGBTriple.mnGreen = rLHS.getGreen();
+ maRGBTriple.mnBlue = rLHS.getBlue();
+ return *this;
- }
++ }
+
HSLColor operator+( const HSLColor& rLHS, const HSLColor& rRHS )
{
return HSLColor( rLHS.getHue() + rRHS.getHue(),
commit 1b4eafbbac3f5829f3a843beb16eaa5782797a20
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Dec 18 18:26:18 2010 +0000
Resoves: rhbz#663857 font color missing; C++ FAQ 10.3 doomage
(cherry picked from commit 963c6b655032b4e5d0f26555f3c26a129a9efb03)
diff --git a/slideshow/source/engine/color.cxx b/slideshow/source/engine/color.cxx
index 4e65fc5..f20f17f 100644
--- a/slideshow/source/engine/color.cxx
+++ b/slideshow/source/engine/color.cxx
@@ -267,8 +267,8 @@ namespace slideshow
}
RGBColor::RGBColor(const RGBColor& rLHS)
+ : maRGBTriple( rLHS.maRGBTriple )
{
- RGBColor(rLHS.getRed(), rLHS.getGreen(), rLHS.getBlue());
}
RGBColor& RGBColor::operator=( const RGBColor& rLHS ){
More information about the Libreoffice-commits
mailing list