X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcolortools.h;fp=src%2Fcolortools.h;h=7ba179167b69927a2ac798c22a45bfb539e73f31;hb=c471a29fcef185bffaff48c4185588f4a8416ca4;hp=6a4ec19d3e12c658d39c0162fdd3932c8b36cc18;hpb=2b62e0186471eb4fc0dc6ef818fc3e7f2a17f654;p=kdenlive diff --git a/src/colortools.h b/src/colortools.h index 6a4ec19d..7ba17916 100644 --- a/src/colortools.h +++ b/src/colortools.h @@ -17,6 +17,8 @@ #include + + class ColorTools : public QObject { Q_OBJECT @@ -24,6 +26,8 @@ class ColorTools : public QObject public: ColorTools(); + enum ColorsRGB { COL_R, COL_G, COL_B }; + /** @brief Draws a UV plane with given Y value. scaling defines how far to zoom in (or out). Lower value = zoom in. @@ -31,7 +35,23 @@ public: If not the full rect should be filled, set circleOnly to true. See also: http://en.wikipedia.org/wiki/YUV and http://de.wikipedia.org/wiki/Vektorskop */ - QImage yuvColorWheel(const QSize& size, const unsigned char Y, const float scaling, const bool modifiedVersion, const bool circleOnly); + QImage yuvColorWheel(const QSize& size, const unsigned char &Y, const float &scaling, const bool &modifiedVersion, const bool &circleOnly); + /** + @brief Draws a UV plane with given UV angle (ratio u:v stays constant) + scaling defines how far to zoom in (or out). Lower value = zoom in. + angle defines the angle in a default U/V plane. A vertical plane, on which Y goes from 0 to 1, + is then laid through the UV plane, with the defined angle. + @see yuvColorWheel() + */ + QImage yuvVerticalPlane(const QSize &size, const float &angle, const float &scaling); + /** + @brief Draws a RGB plane with two values on one axis and one on the other. + This is e.g. useful as background for a curves dialog. On the line from bottom left to top right + 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. + */ + QImage rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB &color); signals: void signalWheelCalculationFinished();