summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolorspace.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-26 14:55:33 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-08-02 21:07:54 +0200
commit05251bca1dc5aabdd1e4548a1bf1bf757f615791 (patch)
tree377406bb433923001f2aa937eaf8fc89ecf23be7 /src/gui/painting/qcolorspace.h
parent092074f9df073c9af075810602d61ac54a115d89 (diff)
Add an easier way to change colorspaces
Adds setters for transfer-functions and primaries. This allows us to remove use of private QColorSpace API from the PNG handler. Change-Id: Ieeff81c813c253649500acd1e53f35247b872325 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/painting/qcolorspace.h')
-rw-r--r--src/gui/painting/qcolorspace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/painting/qcolorspace.h b/src/gui/painting/qcolorspace.h
index a9871fc277..a7c1091911 100644
--- a/src/gui/painting/qcolorspace.h
+++ b/src/gui/painting/qcolorspace.h
@@ -103,6 +103,13 @@ public:
TransferFunction transferFunction() const noexcept;
float gamma() const noexcept;
+ void setTransferFunction(TransferFunction transferFunction, float gamma = 0.0f);
+ QColorSpace withTransferFunction(TransferFunction transferFunction, float gamma = 0.0f) const;
+
+ void setPrimaries(Primaries primariesId);
+ void setPrimaries(const QPointF &whitePoint, const QPointF &redPoint,
+ const QPointF &greenPoint, const QPointF &bluePoint);
+
bool isValid() const noexcept;
friend Q_GUI_EXPORT bool operator==(const QColorSpace &colorSpace1, const QColorSpace &colorSpace2);