summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolor.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-07-02 13:20:39 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-12 14:57:02 +0000
commit8f44aeb10317664dd7cae92e628fb0814e432e17 (patch)
treeb42a61974c713886d79287254866249fcdf62307 /src/gui/painting/qcolor.h
parent6dca11e1af05ddd06439709a210ec225c41276c4 (diff)
Add Extended RGB model to QColor
Can be used to represent wide-gamut and HDR colors. Change-Id: I1cca442069ce2f2c070f723fe930fe1f2f5580ad Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qcolor.h')
-rw-r--r--src/gui/painting/qcolor.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index cbc8b98f9c..77b2d43c40 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -64,7 +64,7 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QColor &);
class Q_GUI_EXPORT QColor
{
public:
- enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl };
+ enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl, ExtendedRgb };
enum NameFormat { HexRgb, HexArgb };
inline QColor() noexcept;
@@ -198,6 +198,7 @@ public:
QColor toHsv() const noexcept;
QColor toCmyk() const noexcept;
QColor toHsl() const noexcept;
+ QColor toExtendedRgb() const noexcept;
Q_REQUIRED_RESULT QColor convertTo(Spec colorSpec) const noexcept;
@@ -275,6 +276,13 @@ private:
ushort lightness;
ushort pad;
} ahsl;
+ struct {
+ ushort alphaF16;
+ ushort redF16;
+ ushort greenF16;
+ ushort blueF16;
+ ushort pad;
+ } argbExtended;
ushort array[5];
} ct;