Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QColorSpace Class Reference

The QColorSpace class provides a color space abstraction. More...

#include <qcolorspace.h>

Inheritance diagram for QColorSpace:
Collaboration diagram for QColorSpace:

Classes

class  PrimaryPoints
 The PrimaryPoints struct contains four primary color space points. More...

Public Types

enum  NamedColorSpace {
  SRgb = 1 , SRgbLinear , AdobeRgb , DisplayP3 ,
  ProPhotoRgb , Bt2020 , Bt2100Pq , Bt2100Hlg
}
 Predefined color spaces. More...
enum class  Primaries {
  Custom = 0 , SRgb , AdobeRgb , DciP3D65 ,
  ProPhotoRgb , Bt2020
}
 Predefined sets of primary colors. More...
enum class  TransferFunction {
  Custom = 0 , Linear , Gamma , SRgb ,
  ProPhotoRgb , Bt2020 , St2084 , Hlg
}
 Predefined transfer functions or gamma curves. More...
enum class  TransformModel : uint8_t { ThreeComponentMatrix = 0 , ElementListProcessing }
enum class  ColorModel : uint8_t { Undefined = 0 , Rgb = 1 , Gray = 2 , Cmyk = 3 }

Public Member Functions

 QColorSpace () noexcept=default
 Creates a new colorspace object that represents an undefined and invalid colorspace.
 QColorSpace (NamedColorSpace namedColorSpace)
 Creates a new colorspace object that represents a namedColorSpace.
 QColorSpace (QPointF whitePoint, TransferFunction transferFunction, float gamma=0.0f)
 Creates a custom grayscale color space with the white point whitePoint, using the transfer function transferFunction and optionally gamma.
 QColorSpace (QPointF whitePoint, const QList< uint16_t > &transferFunctionTable)
 Creates a custom grayscale color space with white point whitePoint, and using the custom transfer function described by transferFunctionTable.
 QColorSpace (Primaries primaries, TransferFunction transferFunction, float gamma=0.0f)
 Creates a custom color space with the primaries primaries, using the transfer function transferFunction and optionally gamma.
 QColorSpace (Primaries primaries, float gamma)
 Creates a custom color space with the primaries primaries, using a gamma transfer function of gamma.
 QColorSpace (Primaries primaries, const QList< uint16_t > &transferFunctionTable)
 Creates a custom color space with the primaries gamut, using a custom transfer function described by transferFunctionTable.
 QColorSpace (const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint, TransferFunction transferFunction, float gamma=0.0f)
 Creates a custom colorspace with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the transfer function transferFunction and optionally gamma.
 QColorSpace (const PrimaryPoints &primaryPoints, TransferFunction transferFunction, float gamma=0.0f)
 Creates a custom colorspace with primaries based on the chromaticities of the primary colors primaryPoints, and using the transfer function transferFunction and optionally gamma.
 QColorSpace (const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint, const QList< uint16_t > &transferFunctionTable)
 Creates a custom color space with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the custom transfer function described by transferFunctionTable.
 QColorSpace (const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint, const QList< uint16_t > &redTransferFunctionTable, const QList< uint16_t > &greenTransferFunctionTable, const QList< uint16_t > &blueTransferFunctionTable)
 Creates a custom color space with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the custom transfer functions described by redTransferFunctionTable, greenTransferFunctionTable, and blueTransferFunctionTable.
 ~QColorSpace ()
 QColorSpace (const QColorSpace &colorSpace) noexcept
QColorSpaceoperator= (const QColorSpace &colorSpace) noexcept
 QColorSpace (QColorSpace &&colorSpace) noexcept=default
void swap (QColorSpace &colorSpace) noexcept
 \memberswap{color space}
Primaries primaries () const noexcept
 Returns the predefined primaries of the color space or primaries::Custom if it doesn't match any of them.
TransferFunction transferFunction () const noexcept
 Returns the predefined transfer function of the color space or TransferFunction::Custom if it doesn't match any of them.
float gamma () const noexcept
 Returns the gamma value of color spaces with TransferFunction::Gamma, an approximate gamma value for other predefined color spaces, or 0.0 if no approximate gamma is known.
QString description () const noexcept
 Returns the name or short description.
void setDescription (const QString &description)
 Sets the name or short description of the color space to description.
void setTransferFunction (TransferFunction transferFunction, float gamma=0.0f)
 Sets the transfer function to transferFunction and gamma.
void setTransferFunction (const QList< uint16_t > &transferFunctionTable)
 Sets the transfer function to transferFunctionTable.
void setTransferFunctions (const QList< uint16_t > &redTransferFunctionTable, const QList< uint16_t > &greenTransferFunctionTable, const QList< uint16_t > &blueTransferFunctionTable)
 Sets the transfer functions to redTransferFunctionTable, greenTransferFunctionTable and blueTransferFunctionTable.
QColorSpace withTransferFunction (TransferFunction transferFunction, float gamma=0.0f) const
 Returns a copy of this color space, except using the transfer function transferFunction and gamma.
QColorSpace withTransferFunction (const QList< uint16_t > &transferFunctionTable) const
 Returns a copy of this color space, except using the transfer function described by transferFunctionTable.
QColorSpace withTransferFunctions (const QList< uint16_t > &redTransferFunctionTable, const QList< uint16_t > &greenTransferFunctionTable, const QList< uint16_t > &blueTransferFunctionTable) const
 Returns a copy of this color space, except using the transfer functions described by redTransferFunctionTable, greenTransferFunctionTable and blueTransferFunctionTable.
void setPrimaries (Primaries primariesId)
 Sets the primaries to those of the primariesId set.
void setPrimaries (const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint)
 Set primaries to the chromaticities of whitePoint, redPoint, greenPoint and bluePoint.
void setWhitePoint (QPointF whitePoint)
 Sets the white point to used for this color space to whitePoint.
QPointF whitePoint () const
 Returns the white point used for this color space.
void setPrimaryPoints (const PrimaryPoints &primaryPoints)
 Set all primaries to the chromaticities of primaryPoints.
PrimaryPoints primaryPoints () const
 Returns the primary chromaticities, if not defined, returns null points.
TransformModel transformModel () const noexcept
 Returns the transfrom processing model used for this color space.
ColorModel colorModel () const noexcept
 Returns the color model this color space can represent.
void detach ()
bool isValid () const noexcept
 Returns true if the color space is valid.
bool isValidTarget () const noexcept
QByteArray iccProfile () const
 Returns an ICC profile representing the color space.
QColorTransform transformationToColorSpace (const QColorSpace &colorspace) const
 Generates and returns a color space transformation from this color space to colorspace.
 operator QVariant () const
 Returns the color space as a QVariant.

Static Public Member Functions

static QColorSpace fromIccProfile (const QByteArray &iccProfile)
 Creates a QColorSpace from ICC profile iccProfile.

Friends

class QColorSpacePrivate
bool operator== (const QColorSpace &colorSpace1, const QColorSpace &colorSpace2)
 Returns true if colorspace colorSpace1 is equal to colorspace colorSpace2; otherwise returns false.
bool operator!= (const QColorSpace &colorSpace1, const QColorSpace &colorSpace2)
 Returns true if colorspace colorSpace1 is not equal to colorspace colorSpace2; otherwise returns false.
Q_GUI_EXPORT QDebug operator<< (QDebug dbg, const QColorSpace &colorSpace)

(Note that these are not member symbols.)

QDataStreamoperator<< (QDataStream &stream, const QColorSpace &colorSpace)
 Writes the given colorSpace to the given stream as an ICC profile.
QDataStreamoperator>> (QDataStream &stream, QColorSpace &colorSpace)
 Reads a color space from the given stream and stores it in the given colorSpace.

Detailed Description

The QColorSpace class provides a color space abstraction.

Since
5.14

\inmodule QtGui

Color values can be interpreted in different ways, and based on the interpretation can live in different spaces. We call this {color spaces}.

QColorSpace provides access to creating several predefined color spaces and can generate QColorTransforms for converting colors from one color space to another.

QColorSpace can also represent color spaces defined by ICC profiles or embedded in images, that do not otherwise fit the predefined color spaces.

A color space can generally speaking be conceived as a combination of set of primary colors and a transfer function. The primaries defines the axes of the color space, and the transfer function how values are mapped on the axes. The primaries are for ColorModel::Rgb color spaces defined by three primary colors that represent exactly how red, green, and blue look in this particular color space, and a white color that represents where and how bright pure white is. For grayscale color spaces, only a single white primary is needed. The range of colors expressible by the primary colors is called the gamut, and a color space that can represent a wider range of colors is also known as a wide-gamut color space.

The transfer function or gamma curve determines how each component in the color space is encoded. These are used because human perception does not operate linearly, and the transfer functions try to ensure that colors will seem evenly spaced to human eyes.

Definition at line 20 of file qcolorspace.h.

Member Enumeration Documentation

◆ ColorModel

enum class QColorSpace::ColorModel : uint8_t
strong
Since
6.8

Defines the color model used by the color space data.

\value Undefined No color model \value Rgb An RGB color model with red, green, and blue colors. Can apply to RGB and grayscale data. \value Gray A gray scale color model. Can only apply to grayscale data. \value Cmyk Can only represent color data defined with cyan, magenta, yellow, and black colors. In effect only QImage::Format_CMYK32. Note Cmyk color spaces will be TransformModel::ElementListProcessing.

Enumerator
Undefined 
Rgb 
Gray 
Cmyk 

Definition at line 60 of file qcolorspace.h.

◆ NamedColorSpace

Predefined color spaces.

\value SRgb The sRGB color space, which Qt operates in by default. It is a close approximation of how most classic monitors operate, and a mode most software and hardware support. \l{http://www.color.org/chardata/rgb/srgb.xalter}{ICC registration of sRGB}. \value SRgbLinear The sRGB color space with linear gamma. Useful for gamma-corrected blending. \value AdobeRgb The Adobe RGB color space is a classic wide-gamut color space, using a gamma of 2.2. \l{http://www.color.org/chardata/rgb/adobergb.xalter}{ICC registration of Adobe RGB (1998)} \value DisplayP3 A color-space using the primaries of DCI-P3, but with the whitepoint and transfer function of sRGB. Common in modern wide-gamut screens. \l{http://www.color.org/chardata/rgb/DCIP3.xalter}{ICC registration of DCI-P3} \value ProPhotoRgb The Pro Photo RGB color space, also known as ROMM RGB is a very wide gamut color space. \l{http://www.color.org/chardata/rgb/rommrgb.xalter}{ICC registration of ROMM RGB} \value [since 6.8] Bt2020 BT.2020, also known as Rec.2020 is a basic colorspace of HDR TVs. \l{http://www.color.org/chardata/rgb/BT2020.xalter}{ICC registration of BT.2020} \value [since 6.8] Bt2100Pq BT.2100(PQ), also known as Rec.2100 or HDR10 is an HDR encoding with the same primaries as Bt2020 but using the Perceptual Quantizer transfer function. \l{http://www.color.org/chardata/rgb/BT2100.xalter}{ICC registration of BT.2100} \value [since 6.8] Bt2100Hlg BT.2100 (HLG) is an HDR encoding with the same primaries as Bt2020 but using the Hybrid Log-Gamma transfer function.

Enumerator
SRgb 
SRgbLinear 
AdobeRgb 
DisplayP3 
ProPhotoRgb 
Bt2020 
Bt2100Pq 
Bt2100Hlg 

Definition at line 24 of file qcolorspace.h.

◆ Primaries

enum class QColorSpace::Primaries
strong

Predefined sets of primary colors.

\value Custom The primaries are undefined or does not match any predefined sets. \value SRgb The sRGB primaries \value AdobeRgb The Adobe RGB primaries \value DciP3D65 The DCI-P3 primaries with the D65 whitepoint \value ProPhotoRgb The ProPhoto RGB primaries with the D50 whitepoint \value [since 6.8] Bt2020 The BT.2020 primaries with a D65 whitepoint

Enumerator
Custom 
SRgb 
AdobeRgb 
DciP3D65 
ProPhotoRgb 
Bt2020 

Definition at line 35 of file qcolorspace.h.

◆ TransferFunction

enum class QColorSpace::TransferFunction
strong

Predefined transfer functions or gamma curves.

\value Custom The custom or null transfer function \value Linear The linear transfer functions \value Gamma A transfer function that is a real gamma curve based on the value of gamma() \value SRgb The sRGB transfer function, composed of linear and gamma parts \value ProPhotoRgb The ProPhoto RGB transfer function, composed of linear and gamma parts \value [since 6.8] Bt2020 The BT.2020 transfer function, composited of linear and gamma parts \value [since 6.8] St2084 The SMPTE ST 2084 transfer function, also known Perceptual Quantizer(PQ). \value [since 6.8] Hlg The Hybrid log-gamma transfer function.

Enumerator
Custom 
Linear 
Gamma 
SRgb 
ProPhotoRgb 
Bt2020 
St2084 
Hlg 

Definition at line 44 of file qcolorspace.h.

◆ TransformModel

enum class QColorSpace::TransformModel : uint8_t
strong
Since
6.8

Defines the processing model used for color space transforms.

\value ThreeComponentMatrix The transform consist of a matrix calculated from primaries and set of transfer functions for each color channel. This is very fast and used by all predefined color spaces. Any color space on this form is reversible and always both valid sources and targets. \value ElementListProcessing The transforms are one or two lists of processing elements that can do many things, each list only process either to the connection color space or from it. This is very flexible, but rather slow, and can only be set by reading ICC profiles (See \l fromIccProfile()). Since the two lists are separate a color space on this form can be a valid source, but not necessarily also a valid target. When changing either primaries or transfer function on a color space on this type it will reset to an empty ThreeComponentMatrix form.

Enumerator
ThreeComponentMatrix 
ElementListProcessing 

Definition at line 55 of file qcolorspace.h.

Constructor & Destructor Documentation

◆ QColorSpace() [1/13]

QColorSpace::QColorSpace ( )
defaultnoexcept

Creates a new colorspace object that represents an undefined and invalid colorspace.

◆ QColorSpace() [2/13]

QColorSpace::QColorSpace ( NamedColorSpace namedColorSpace)

Creates a new colorspace object that represents a namedColorSpace.

Definition at line 682 of file qcolorspace.cpp.

◆ QColorSpace() [3/13]

QColorSpace::QColorSpace ( QPointF whitePoint,
TransferFunction transferFunction,
float gamma = 0.0f )
explicit

Creates a custom grayscale color space with the white point whitePoint, using the transfer function transferFunction and optionally gamma.

Since
6.8

Definition at line 741 of file qcolorspace.cpp.

◆ QColorSpace() [4/13]

QColorSpace::QColorSpace ( QPointF whitePoint,
const QList< uint16_t > & transferFunctionTable )
explicit

Creates a custom grayscale color space with white point whitePoint, and using the custom transfer function described by transferFunctionTable.

Since
6.8

Definition at line 752 of file qcolorspace.cpp.

◆ QColorSpace() [5/13]

QColorSpace::QColorSpace ( QColorSpace::Primaries primaries,
QColorSpace::TransferFunction transferFunction,
float gamma = 0.0f )

Creates a custom color space with the primaries primaries, using the transfer function transferFunction and optionally gamma.

Definition at line 707 of file qcolorspace.cpp.

◆ QColorSpace() [6/13]

QColorSpace::QColorSpace ( QColorSpace::Primaries primaries,
float gamma )

Creates a custom color space with the primaries primaries, using a gamma transfer function of gamma.

Definition at line 716 of file qcolorspace.cpp.

◆ QColorSpace() [7/13]

QColorSpace::QColorSpace ( QColorSpace::Primaries gamut,
const QList< uint16_t > & transferFunctionTable )

Creates a custom color space with the primaries gamut, using a custom transfer function described by transferFunctionTable.

The table should contain at least 2 values, and contain an monotonically increasing list of values from 0 to 65535.

Since
6.1

Definition at line 730 of file qcolorspace.cpp.

◆ QColorSpace() [8/13]

QColorSpace::QColorSpace ( const QPointF & whitePoint,
const QPointF & redPoint,
const QPointF & greenPoint,
const QPointF & bluePoint,
QColorSpace::TransferFunction transferFunction,
float gamma = 0.0f )

Creates a custom colorspace with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the transfer function transferFunction and optionally gamma.

Definition at line 761 of file qcolorspace.cpp.

◆ QColorSpace() [9/13]

QColorSpace::QColorSpace ( const PrimaryPoints & primaryPoints,
TransferFunction transferFunction,
float gamma = 0.0f )

Creates a custom colorspace with primaries based on the chromaticities of the primary colors primaryPoints, and using the transfer function transferFunction and optionally gamma.

Since
6.9

Definition at line 774 of file qcolorspace.cpp.

◆ QColorSpace() [10/13]

QColorSpace::QColorSpace ( const QPointF & whitePoint,
const QPointF & redPoint,
const QPointF & greenPoint,
const QPointF & bluePoint,
const QList< uint16_t > & transferFunctionTable )

Creates a custom color space with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the custom transfer function described by transferFunctionTable.

Since
6.1

Definition at line 791 of file qcolorspace.cpp.

◆ QColorSpace() [11/13]

QColorSpace::QColorSpace ( const QPointF & whitePoint,
const QPointF & redPoint,
const QPointF & greenPoint,
const QPointF & bluePoint,
const QList< uint16_t > & redTransferFunctionTable,
const QList< uint16_t > & greenTransferFunctionTable,
const QList< uint16_t > & blueTransferFunctionTable )

Creates a custom color space with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the custom transfer functions described by redTransferFunctionTable, greenTransferFunctionTable, and blueTransferFunctionTable.

Since
6.1

Definition at line 805 of file qcolorspace.cpp.

◆ ~QColorSpace()

QColorSpace::~QColorSpace ( )
default

◆ QColorSpace() [12/13]

QColorSpace::QColorSpace ( const QColorSpace & colorSpace)
defaultnoexcept

◆ QColorSpace() [13/13]

QColorSpace::QColorSpace ( QColorSpace && colorSpace)
defaultnoexcept

Member Function Documentation

◆ colorModel()

QColorSpace::ColorModel QColorSpace::colorModel ( ) const
noexcept

Returns the color model this color space can represent.

Since
6.8

Definition at line 1154 of file qcolorspace.cpp.

◆ description()

QString QColorSpace::description ( ) const
noexcept

Returns the name or short description.

If a description hasn't been given in setDescription(), the original name of the profile is returned if the profile is unmodified, a guessed name is returned if the profile has been recognized as a known color space, otherwise an empty string is returned.

Since
6.2

Definition at line 1458 of file qcolorspace.cpp.

◆ detach()

void QColorSpace::detach ( )

Definition at line 1164 of file qcolorspace.cpp.

◆ fromIccProfile()

QColorSpace QColorSpace::fromIccProfile ( const QByteArray & iccProfile)
static

Creates a QColorSpace from ICC profile iccProfile.

Note
Not all ICC profiles are supported. QColorSpace only supports RGB or Gray ICC profiles.

If the ICC profile is not supported an invalid QColorSpace is returned where you can still read the original ICC profile using iccProfile().

See also
iccProfile()

Definition at line 1206 of file qcolorspace.cpp.

◆ gamma()

float QColorSpace::gamma ( ) const
noexcept

Returns the gamma value of color spaces with TransferFunction::Gamma, an approximate gamma value for other predefined color spaces, or 0.0 if no approximate gamma is known.

See also
transferFunction()

Definition at line 858 of file qcolorspace.cpp.

◆ iccProfile()

QByteArray QColorSpace::iccProfile ( ) const

Returns an ICC profile representing the color space.

If the color space was generated from an ICC profile, that profile is returned, otherwise one is generated.

Note
Even invalid color spaces may return the ICC profile if they were generated from one, to allow applications to implement wider support themselves.
See also
fromIccProfile()

Definition at line 1184 of file qcolorspace.cpp.

◆ isValid()

bool QColorSpace::isValid ( ) const
noexcept

Returns true if the color space is valid.

For a color space with TransformModel::ThreeComponentMatrix that means both primaries and transfer functions set, and implies isValidTarget(). For a color space with TransformModel::ElementListProcessing it means it has a valid source transform, to check if it also a valid target color space use isValidTarget().

See also
isValidTarget()

Definition at line 1224 of file qcolorspace.cpp.

◆ isValidTarget()

bool QColorSpace::isValidTarget ( ) const
noexcept
Since
6.8

Returns true if the color space is a valid target color space.

Definition at line 1236 of file qcolorspace.cpp.

◆ operator QVariant()

QColorSpace::operator QVariant ( ) const

Returns the color space as a QVariant.

Since
5.15

Definition at line 1445 of file qcolorspace.cpp.

◆ operator=()

QColorSpace & QColorSpace::operator= ( const QColorSpace & colorSpace)
inlinenoexcept

Definition at line 101 of file qcolorspace.h.

◆ primaries()

QColorSpace::Primaries QColorSpace::primaries ( ) const
noexcept

Returns the predefined primaries of the color space or primaries::Custom if it doesn't match any of them.

Definition at line 831 of file qcolorspace.cpp.

◆ primaryPoints()

QColorSpace::PrimaryPoints QColorSpace::primaryPoints ( ) const

Returns the primary chromaticities, if not defined, returns null points.

Since
6.9
See also
primaries(), setPrimaryPoints()

Definition at line 1075 of file qcolorspace.cpp.

◆ setDescription()

void QColorSpace::setDescription ( const QString & description)

Sets the name or short description of the color space to description.

If set to empty description() will return original or guessed descriptions instead.

Since
6.2

Definition at line 1473 of file qcolorspace.cpp.

◆ setPrimaries() [1/2]

void QColorSpace::setPrimaries ( const QPointF & whitePoint,
const QPointF & redPoint,
const QPointF & greenPoint,
const QPointF & bluePoint )

Set primaries to the chromaticities of whitePoint, redPoint, greenPoint and bluePoint.

See also
primaries(), setPrimaryPoints()

Definition at line 1030 of file qcolorspace.cpp.

◆ setPrimaries() [2/2]

void QColorSpace::setPrimaries ( QColorSpace::Primaries primariesId)

Sets the primaries to those of the primariesId set.

See also
primaries()

Definition at line 1003 of file qcolorspace.cpp.

◆ setPrimaryPoints()

void QColorSpace::setPrimaryPoints ( const PrimaryPoints & primaryPoints)

Set all primaries to the chromaticities of primaryPoints.

Since
6.9
See also
primaries(), primaryPoints()

Definition at line 1042 of file qcolorspace.cpp.

◆ setTransferFunction() [1/2]

void QColorSpace::setTransferFunction ( const QList< uint16_t > & transferFunctionTable)

Sets the transfer function to transferFunctionTable.

Since
6.1
See also
withTransferFunction()

Definition at line 897 of file qcolorspace.cpp.

◆ setTransferFunction() [2/2]

void QColorSpace::setTransferFunction ( QColorSpace::TransferFunction transferFunction,
float gamma = 0.0f )

Sets the transfer function to transferFunction and gamma.

See also
transferFunction(), gamma(), withTransferFunction()

Definition at line 870 of file qcolorspace.cpp.

◆ setTransferFunctions()

void QColorSpace::setTransferFunctions ( const QList< uint16_t > & redTransferFunctionTable,
const QList< uint16_t > & greenTransferFunctionTable,
const QList< uint16_t > & blueTransferFunctionTable )

Sets the transfer functions to redTransferFunctionTable, greenTransferFunctionTable and blueTransferFunctionTable.

Since
6.1
See also
withTransferFunctions()

Definition at line 922 of file qcolorspace.cpp.

◆ setWhitePoint()

void QColorSpace::setWhitePoint ( QPointF whitePoint)

Sets the white point to used for this color space to whitePoint.

Since
6.8

Definition at line 1103 of file qcolorspace.cpp.

◆ swap()

void QColorSpace::swap ( QColorSpace & colorSpace)
inlinenoexcept

\memberswap{color space}

Definition at line 111 of file qcolorspace.h.

◆ transferFunction()

QColorSpace::TransferFunction QColorSpace::transferFunction ( ) const
noexcept

Returns the predefined transfer function of the color space or TransferFunction::Custom if it doesn't match any of them.

See also
gamma(), setTransferFunction(), withTransferFunction()

Definition at line 844 of file qcolorspace.cpp.

◆ transformationToColorSpace()

QColorTransform QColorSpace::transformationToColorSpace ( const QColorSpace & colorspace) const

Generates and returns a color space transformation from this color space to colorspace.

Definition at line 1426 of file qcolorspace.cpp.

◆ transformModel()

QColorSpace::TransformModel QColorSpace::transformModel ( ) const
noexcept

Returns the transfrom processing model used for this color space.

Since
6.8

Definition at line 1142 of file qcolorspace.cpp.

◆ whitePoint()

QPointF QColorSpace::whitePoint ( ) const

Returns the white point used for this color space.

Returns a null QPointF if not defined.

Since
6.8

Definition at line 1091 of file qcolorspace.cpp.

◆ withTransferFunction() [1/2]

QColorSpace QColorSpace::withTransferFunction ( const QList< uint16_t > & transferFunctionTable) const

Returns a copy of this color space, except using the transfer function described by transferFunctionTable.

Since
6.1
See also
transferFunction(), setTransferFunction()

Definition at line 970 of file qcolorspace.cpp.

◆ withTransferFunction() [2/2]

QColorSpace QColorSpace::withTransferFunction ( QColorSpace::TransferFunction transferFunction,
float gamma = 0.0f ) const

Returns a copy of this color space, except using the transfer function transferFunction and gamma.

See also
transferFunction(), gamma(), setTransferFunction()

Definition at line 952 of file qcolorspace.cpp.

◆ withTransferFunctions()

QColorSpace QColorSpace::withTransferFunctions ( const QList< uint16_t > & redTransferFunctionTable,
const QList< uint16_t > & greenTransferFunctionTable,
const QList< uint16_t > & blueTransferFunctionTable ) const

Returns a copy of this color space, except using the transfer functions described by redTransferFunctionTable, greenTransferFunctionTable and blueTransferFunctionTable.

Since
6.1
See also
setTransferFunctions()

Definition at line 987 of file qcolorspace.cpp.

◆ operator!=

bool operator!= ( const QColorSpace & colorSpace1,
const QColorSpace & colorSpace2 )
friend

Returns true if colorspace colorSpace1 is not equal to colorspace colorSpace2; otherwise returns false.

Definition at line 148 of file qcolorspace.h.

◆ operator<<() [1/2]

QDataStream & operator<< ( QDataStream & stream,
const QColorSpace & colorSpace )
related

Writes the given colorSpace to the given stream as an ICC profile.

See also
QColorSpace::iccProfile(), {Serializing Qt Data Types}

◆ operator<< [2/2]

Q_GUI_EXPORT QDebug operator<< ( QDebug dbg,
const QColorSpace & colorSpace )
friend

Definition at line 1541 of file qcolorspace.cpp.

◆ operator==

bool operator== ( const QColorSpace & colorSpace1,
const QColorSpace & colorSpace2 )
friend

Returns true if colorspace colorSpace1 is equal to colorspace colorSpace2; otherwise returns false.

Definition at line 146 of file qcolorspace.h.

◆ operator>>()

QDataStream & operator>> ( QDataStream & stream,
QColorSpace & colorSpace )
related

Reads a color space from the given stream and stores it in the given colorSpace.

See also
QColorSpace::fromIccProfile(), {Serializing Qt Data Types}

◆ QColorSpacePrivate

friend class QColorSpacePrivate
friend

Definition at line 159 of file qcolorspace.h.


The documentation for this class was generated from the following files: