From 05251bca1dc5aabdd1e4548a1bf1bf757f615791 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 26 Feb 2019 14:55:33 +0100 Subject: 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 --- src/gui/painting/qcolorspace.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gui/painting/qcolorspace.h') 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); -- cgit v1.2.3