diff options
author | thb <thb@openoffice.org> | 2010-02-19 11:14:19 +0100 |
---|---|---|
committer | thb <thb@openoffice.org> | 2010-02-19 11:14:19 +0100 |
commit | 7ffd813fd3f0c4ec1e6b6f168acf94a6c3246a58 (patch) | |
tree | 1a29e816428fd3e2d808cc0f993a1fc9e981074b /basegfx/test/basegfx2d.cxx | |
parent | b76532e1fbc6ac8d421308cac5a1d4fb239047db (diff) |
Fix rgb2hsl miscalculation + add according test case
* the fourth quadrant hue calculation had a typo for the rgb2hsl
function. fixed now.
* added testcase that break before, and works now
Diffstat (limited to 'basegfx/test/basegfx2d.cxx')
-rw-r--r-- | basegfx/test/basegfx2d.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index 0dfb3a8ea999..d8b574769554 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -1345,6 +1345,8 @@ public: tools::rgb2hsl(maMagenta) == BColor(300,1,0.5)); CPPUNIT_ASSERT_MESSAGE("cyan", tools::rgb2hsl(maCyan) == BColor(180,1,0.5)); + CPPUNIT_ASSERT_MESSAGE("third hue case", + tools::rgb2hsl(BColor(0,0.5,1)) == BColor(210,1,0.5)); CPPUNIT_ASSERT_MESSAGE("roundtrip white", tools::hsl2rgb(tools::rgb2hsl(maWhite)) == maWhite); |