From 7ffd813fd3f0c4ec1e6b6f168acf94a6c3246a58 Mon Sep 17 00:00:00 2001 From: thb Date: Fri, 19 Feb 2010 11:14:19 +0100 Subject: 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 --- basegfx/test/basegfx2d.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'basegfx/test/basegfx2d.cxx') 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); -- cgit