X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcolortools.h;h=0441377c4e8df12bc923dc385ea81444ec772ee9;hb=f9394be680a8ac3c2ff8e39c9d8439eae5b55acc;hp=7ba179167b69927a2ac798c22a45bfb539e73f31;hpb=c471a29fcef185bffaff48c4185588f4a8416ca4;p=kdenlive diff --git a/src/colortools.h b/src/colortools.h index 7ba17916..0441377c 100644 --- a/src/colortools.h +++ b/src/colortools.h @@ -26,7 +26,7 @@ class ColorTools : public QObject public: ColorTools(); - enum ColorsRGB { COL_R, COL_G, COL_B }; + enum ColorsRGB { COL_R, COL_G, COL_B, COL_Luma }; /** @brief Draws a UV plane with given Y value. @@ -50,11 +50,21 @@ public: are neutral colors. The colors on the y axis show what the neutral color will look like when modifying the curve. color defines the color to modify on the y axis. The other two components will be increased in equal terms (linear as well) on the x axis. + scaling \in ]0,1] defines the maximum variance of the selected component; Chosing a value lower than 1 + simulates the case that the curves can adjust only +- scaling*255. This mainly delivers a more constant look + when also using the Luma component for the curves display but might not represent the actual color change! */ - QImage rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB &color); + static QImage rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB &color, float scaling = 1); + /** + @brief Draws a YPbPr plane with Pb on the x axis and Pr on the y axis. + Y is the Y value to use. + scaling defines how far to zoom in (or out). Lower value = zoom in. + See also: http://de.wikipedia.org/wiki/YPbPr-Farbmodell and http://www.poynton.com/ColorFAQ.html + */ + QImage yPbPrColorWheel(const QSize &size, const unsigned char &Y, const float &scaling, const bool &circleOnly); signals: - void signalWheelCalculationFinished(); + void signalYuvWheelCalculationFinished(); }; #endif // COLORTOOLS_H