Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f84694ea authored by Emanuele Tamponi's avatar Emanuele Tamponi

Initial commit for the new and complete Kubelka-Munk algorithm. It uses a pregenerated

matrix and the Simplex Method to calculate a realistic reflectance curve for the current 
colors. Using the generated curves, we calculate K and S values for each wavelenght, and 
then a linear combination of these values bring us to the final, realistically acceptable
final color. It's slow right now because the Simplex Method is used too often. I'm going to 
implement a Kis(Ko?)Reflectance10ColorSpace to accelerate the process.
One Algorithm to rule them all!

svn path=/trunk/koffice/; revision=689957
parent d25b1b85
......@@ -209,8 +209,8 @@ void MixerTool::mixPaint(KisPaintDeviceSP stroke, KoPointerEvent *e)
canvasColor.blue());
if (strokeColor != canvasColor) {
strokeCell.mixColorsUsingKS(canvasCell, force);
// strokeCell.mixColorsUsingKSXyz(canvasCell, force);
// strokeCell.mixColorsUsingKS(canvasCell, force);
strokeCell.mixColorsUsingKSXyz(canvasCell, force);
// strokeCell.mixColorsUsingRgb_2(canvasCell, force);
// strokeCell.mixColorsUsingRgbAdditive(canvasCell, force);
// strokeCell.mixColorsUsingXyz(canvasCell, force);
......
......@@ -122,7 +122,7 @@ public:
void mixColorsUsingKS(const Cell &cell, float force);
void mixColorsUsingKSXyz(const Cell &cell, float force);
void mixColorsUsingXyz(const Cell &cell, float force);
// void mixColorsUsingXyz(const Cell &cell, float force);
void mixColorsUsingRgb(const Cell &cell, float force);
void mixColorsUsingRgbAdditive(const Cell &cell, float force);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment