diff options
Diffstat (limited to 'src/gui/painting/qcolormatrix_p.h')
-rw-r--r-- | src/gui/painting/qcolormatrix_p.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/gui/painting/qcolormatrix_p.h b/src/gui/painting/qcolormatrix_p.h index 66db95df7e..edb2d32258 100644 --- a/src/gui/painting/qcolormatrix_p.h +++ b/src/gui/painting/qcolormatrix_p.h @@ -62,17 +62,16 @@ class QColorVector { public: QColorVector() = default; - Q_DECL_CONSTEXPR QColorVector(float x, float y, float z) : x(x), y(y), z(z), _unused(0.0f) { } + Q_DECL_CONSTEXPR QColorVector(float x, float y, float z) : x(x), y(y), z(z) { } explicit Q_DECL_CONSTEXPR QColorVector(const QPointF &chr) // from XY chromaticity : x(chr.x() / chr.y()) , y(1.0f) , z((1.0 - chr.x() - chr.y()) / chr.y()) - , _unused(0.0f) { } - float x; // X, x or red - float y; // Y, y or green - float z; // Z, Y or blue - float _unused; + float x = 0.0f; // X, x or red + float y = 0.0f; // Y, y or green + float z = 0.0f; // Z, Y or blue + float _unused = 0.0f; friend inline bool operator==(const QColorVector &v1, const QColorVector &v2); friend inline bool operator!=(const QColorVector &v1, const QColorVector &v2); @@ -81,7 +80,6 @@ public: return !x && !y && !z; } - static Q_DECL_CONSTEXPR QColorVector null() { return QColorVector(0.0f, 0.0f, 0.0f); } static bool isValidChromaticity(const QPointF &chr) { if (chr.x() < qreal(0.0) || chr.x() > qreal(1.0)) @@ -187,10 +185,6 @@ public: { r.z, g.z, b.z } }; } - static QColorMatrix null() - { - return { QColorVector::null(), QColorVector::null(), QColorVector::null() }; - } static QColorMatrix identity() { return { { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f } }; @@ -226,12 +220,6 @@ public: { 0.1351922452f, 0.7118769884f, 0.0000000000f }, { 0.0313525312f, 0.0000856627f, 0.8251883388f } }; } - static QColorMatrix toXyzFromBt2020() - { - return QColorMatrix { { 0.6506130099f, 0.2695676684f, -0.0018652577f }, - { 0.1865101457f, 0.6840794086f, 0.0172256753f }, - { 0.1270887405f, 0.0463530831f, 0.8098278046f } }; - } }; inline bool operator==(const QColorMatrix &m1, const QColorMatrix &m2) |