Reworked color functions

see issue 1052
This commit is contained in:
Oliver Duis
2012-07-11 09:10:49 +02:00
parent af9fb61241
commit 8b8ced3a39
15 changed files with 546 additions and 811 deletions

View File

@@ -18,7 +18,7 @@
*/
#include "hsvequalizer.h"
#include "../rtengine/improcfun.h"
#include "../rtengine/color.h"
using namespace rtengine;
using namespace rtengine::procparams;
@@ -195,19 +195,19 @@ void HSVEqualizer::colorForValue (double valX, double valY) {
h -= 1.0f;
else if (h < 0.0f)
h += 1.0f;
ImProcFunctions::hsv2rgb01(h, 0.5f, 0.5f, r, g, b);
Color::hsv2rgb01(h, 0.5f, 0.5f, r, g, b);
red = double(r);
green = double(g);
blue = double(b);
}
else if (ce == sshape) { // Saturation = f(Hue)
ImProcFunctions::hsv2rgb01(float(valX), float(valY), 0.5f, r, g, b);
Color::hsv2rgb01(float(valX), float(valY), 0.5f, r, g, b);
red = double(r);
green = double(g);
blue = double(b);
}
else if (ce == vshape) { // Value = f(Hue)
ImProcFunctions::hsv2rgb01(float(valX), 0.5f, float(valY), r, g, b);
Color::hsv2rgb01(float(valX), 0.5f, float(valY), r, g, b);
red = double(r);
green = double(g);
blue = double(b);