1 /***************************************************************************
2 * Copyright (C) 2010 by Simon Andreas Eugster (simon.eu@gmail.com) *
3 * This file is part of kdenlive. See www.kdenlive.org. *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
22 class ColorTools : public QObject
29 enum ColorsRGB { COL_R, COL_G, COL_B };
32 @brief Draws a UV plane with given Y value.
33 scaling defines how far to zoom in (or out). Lower value = zoom in.
34 The modified version always scales the RGB values so that at least one of them attains 255.
35 If not the full rect should be filled, set circleOnly to true.
36 See also: http://en.wikipedia.org/wiki/YUV and http://de.wikipedia.org/wiki/Vektorskop
38 QImage yuvColorWheel(const QSize& size, const unsigned char &Y, const float &scaling, const bool &modifiedVersion, const bool &circleOnly);
40 @brief Draws a UV plane with given UV angle (ratio u:v stays constant)
41 scaling defines how far to zoom in (or out). Lower value = zoom in.
42 angle defines the angle in a default U/V plane. A vertical plane, on which Y goes from 0 to 1,
43 is then laid through the UV plane, with the defined angle.
46 QImage yuvVerticalPlane(const QSize &size, const float &angle, const float &scaling);
48 @brief Draws a RGB plane with two values on one axis and one on the other.
49 This is e.g. useful as background for a curves dialog. On the line from bottom left to top right
50 are neutral colors. The colors on the y axis show what the neutral color will look like when modifying the curve.
51 color defines the color to modify on the y axis. The other two components will be increased
52 in equal terms (linear as well) on the x axis.
54 QImage rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB &color);
56 @brief Draws a YPbPr plane with Pb on the x axis and Pr on the y axis.
57 Y is the Y value to use.
58 scaling defines how far to zoom in (or out). Lower value = zoom in.
59 See also: http://de.wikipedia.org/wiki/YPbPr-Farbmodell and http://www.poynton.com/ColorFAQ.html
61 QImage yPbPrColorWheel(const QSize &size, const unsigned char &Y, const float &scaling, const bool &circleOnly);
64 void signalYuvWheelCalculationFinished();
67 #endif // COLORTOOLS_H