diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-11 11:12:43 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-03-10 12:27:54 +0000 |
commit | e2c91dd77bd85cdcb8e316a0f582e4f36ea4bcfb (patch) | |
tree | 5eabdd03dd9a41523d09eaf3d51265d80d3b6b83 /src/gui/painting/qcolor.h | |
parent | 395e205f2f51620212b8a8d710a02b5daf5e97b5 (diff) |
Introduce QRgba64 structure for 64bit RGBA values
This structure is meant to replace QRgb where higher precision is
needed.
Change-Id: I49d441e2133371a8b91c2e6af0c137bcc5fcb9ed
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/painting/qcolor.h')
-rw-r--r-- | src/gui/painting/qcolor.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h index 06c218365b..9175875310 100644 --- a/src/gui/painting/qcolor.h +++ b/src/gui/painting/qcolor.h @@ -37,6 +37,7 @@ #include <QtGui/qrgb.h> #include <QtCore/qnamespace.h> #include <QtCore/qstringlist.h> +#include <QtGui/qrgba64.h> QT_BEGIN_NAMESPACE @@ -63,6 +64,7 @@ public: QColor(Qt::GlobalColor color); QColor(int r, int g, int b, int a = 255); QColor(QRgb rgb); + QColor(QRgba64 rgba64); QColor(const QString& name); QColor(const char *name); QColor(const QColor &color); // ### Qt 6: remove, the trivial one is fine. @@ -109,6 +111,9 @@ public: QRgb rgba() const; void setRgba(QRgb rgba); + QRgba64 rgba64() const; + void setRgba64(QRgba64 rgba); + QRgb rgb() const; void setRgb(QRgb rgb); @@ -173,6 +178,9 @@ public: static QColor fromRgb(int r, int g, int b, int a = 255); static QColor fromRgbF(qreal r, qreal g, qreal b, qreal a = 1.0); + static QColor fromRgba64(ushort r, ushort g, ushort b, ushort a = USHRT_MAX); + static QColor fromRgba64(QRgba64 rgba); + static QColor fromHsv(int h, int s, int v, int a = 255); static QColor fromHsvF(qreal h, qreal s, qreal v, qreal a = 1.0); |