Commit e20cb65f authored by Vincent Pinon's avatar Vincent Pinon

Gardening: fix GCC warnings (7)

parent 2bda800f
......@@ -23,7 +23,7 @@ ColorTools::ColorTools(QObject *parent)
{
}
QImage ColorTools::yuvColorWheel(const QSize &size, const unsigned char &Y, const float &scaling, const bool &modifiedVersion, const bool &circleOnly)
QImage ColorTools::yuvColorWheel(const QSize &size, int Y, float scaling, bool modifiedVersion, bool circleOnly)
{
QImage wheel(size, QImage::Format_ARGB32);
if (size.width() == 0 || size.height() == 0) {
......@@ -114,7 +114,7 @@ QImage ColorTools::yuvColorWheel(const QSize &size, const unsigned char &Y, cons
return wheel;
}
QImage ColorTools::yuvVerticalPlane(const QSize &size, const float &angle, const float &scaling)
QImage ColorTools::yuvVerticalPlane(const QSize &size, int angle, float scaling)
{
QImage plane(size, QImage::Format_ARGB32);
if (size.width() == 0 || size.height() == 0) {
......@@ -252,7 +252,7 @@ QImage ColorTools::rgbCurveLine(const QSize &size, const ColorTools::ColorsRGB &
return plane;
}
QImage ColorTools::yPbPrColorWheel(const QSize &size, const unsigned char &Y, const float &scaling, const bool &circleOnly)
QImage ColorTools::yPbPrColorWheel(const QSize &size, int Y, float scaling, bool circleOnly)
{
QImage wheel(size, QImage::Format_ARGB32);
......@@ -325,7 +325,7 @@ QImage ColorTools::yPbPrColorWheel(const QSize &size, const unsigned char &Y, co
return wheel;
}
QImage ColorTools::hsvHueShiftPlane(const QSize &size, const uint &S, const uint &V, const int &MIN, const int &MAX)
QImage ColorTools::hsvHueShiftPlane(const QSize &size, int S, int V, int MIN, int MAX)
{
Q_ASSERT(size.width() > 0);
Q_ASSERT(size.height() > 0);
......
......@@ -38,7 +38,7 @@ 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, int Y, float scaling, bool modifiedVersion, 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.
......@@ -46,7 +46,7 @@ public:
is then laid through the UV plane, with the defined angle.
@see yuvColorWheel()
*/
QImage yuvVerticalPlane(const QSize &size, const float &angle, const float &scaling);
QImage yuvVerticalPlane(const QSize& size, int angle, 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
......@@ -69,7 +69,7 @@ public:
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);
QImage yPbPrColorWheel(const QSize &size, int Y, float scaling, bool circleOnly);
/**
@brief Draws a HSV plane with Hue on the x axis and hue difference on the y axis.
This is for the Bézier Curves widget which allows to change the hue (y) of a certain hue.
......@@ -77,7 +77,7 @@ public:
For the value ranges see:
http://doc.qt.nokia.com/latest/qcolor.html#the-hsv-color-model
*/
static QImage hsvHueShiftPlane(const QSize &size, const uint &S, const uint &V, const int &MIN, const int &MAX);
static QImage hsvHueShiftPlane(const QSize &size, int S, int V, int MIN, int MAX);
/**
Basic HSV plane with two components varying on the x and y axis.
......
......@@ -83,7 +83,7 @@ QImage AudioCorrelationInfo::toImage(int height) const
}
for (int x = 0; x < width; ++x) {
int val = m_correlationVector[x] / double(maxVal) * img.height();
int val = img.height() * m_correlationVector[x] / maxVal;
for (int y = img.height() - 1; y > img.height() - val - 1; --y) {
img.setPixel(x, y, qRgb(50, 50, 50));
}
......
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