diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-12 18:18:21 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-02 09:44:55 +0200 |
commit | 76c097c4d7eb873052de031fbc2d21579aa3947a (patch) | |
tree | 828ba096338d79be400d32c29538f38c7600016c /src/gui/painting/qcolorspace.h | |
parent | 97d651711480be05a060b37baa6c86bf75c3df30 (diff) |
Improve our color space terminology
Replace our use of 'gamut' with 'primaries'. One is the axes of the
color space, the other the volume of representable values. For the
currently supported color spaces those are mostly equivalent, but when
we later add support for scRgb, this would be misleading as it has the
same primaries as sRGB but a much wider gamut, and we would like to use
the same primaries/"gamut" id for it.
Also few people would know what "the sRGB gamut" is, but
"the sRGB primaries" is easily googable.
Change-Id: I3348ccaae27a071ec77a4356331b9bbbf92e0d19
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting/qcolorspace.h')
-rw-r--r-- | src/gui/painting/qcolorspace.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/painting/qcolorspace.h b/src/gui/painting/qcolorspace.h index 709ce38916..a9871fc277 100644 --- a/src/gui/painting/qcolorspace.h +++ b/src/gui/painting/qcolorspace.h @@ -63,7 +63,7 @@ public: Bt2020, }; Q_ENUM(ColorSpaceId) - enum class Gamut { + enum class Primaries { Custom = 0, SRgb, AdobeRgb, @@ -71,7 +71,7 @@ public: ProPhotoRgb, Bt2020, }; - Q_ENUM(Gamut) + Q_ENUM(Primaries) enum class TransferFunction { Custom = 0, Linear, @@ -83,8 +83,8 @@ public: Q_ENUM(TransferFunction) QColorSpace(ColorSpaceId colorSpaceId = Undefined); - QColorSpace(Gamut gamut, TransferFunction fun, float gamma = 0.0f); - QColorSpace(Gamut gamut, float gamma); + QColorSpace(Primaries primaries, TransferFunction fun, float gamma = 0.0f); + QColorSpace(Primaries primaries, float gamma); QColorSpace(const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint, TransferFunction fun, float gamma = 0.0f); @@ -99,7 +99,7 @@ public: { qSwap(d_ptr, colorSpace.d_ptr); } ColorSpaceId colorSpaceId() const noexcept; - Gamut gamut() const noexcept; + Primaries primaries() const noexcept; TransferFunction transferFunction() const noexcept; float gamma() const noexcept; |