Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QColorSpacePrivate Class Reference

#include <qcolorspace_p.h>

+ Inheritance diagram for QColorSpacePrivate:
+ Collaboration diagram for QColorSpacePrivate:

Classes

struct  LUT
 
struct  TransferElement
 

Public Types

using Element = std::variant<TransferElement, QColorMatrix, QColorVector, QColorCLUT>
 

Public Member Functions

 QColorSpacePrivate ()
 
 QColorSpacePrivate (QColorSpace::NamedColorSpace namedColorSpace)
 
 QColorSpacePrivate (QColorSpace::Primaries primaries, QColorSpace::TransferFunction transferFunction, float gamma)
 
 QColorSpacePrivate (QColorSpace::Primaries primaries, const QList< uint16_t > &transferFunctionTable)
 
 QColorSpacePrivate (const QColorSpacePrimaries &primaries, QColorSpace::TransferFunction transferFunction, float gamma)
 
 QColorSpacePrivate (const QColorSpacePrimaries &primaries, const QList< uint16_t > &transferFunctionTable)
 
 QColorSpacePrivate (const QColorSpacePrimaries &primaries, const QList< uint16_t > &redTransferFunctionTable, const QList< uint16_t > &greenTransferFunctionTable, const QList< uint16_t > &blueRransferFunctionTable)
 
 QColorSpacePrivate (const QPointF &whitePoint, QColorSpace::TransferFunction transferFunction, float gamma)
 
 QColorSpacePrivate (const QPointF &whitePoint, const QList< uint16_t > &transferFunctionTable)
 
 QColorSpacePrivate (const QColorSpacePrivate &other)=default
 
bool equals (const QColorSpacePrivate *other) const
 
bool isValid () const noexcept
 
void initialize ()
 
void setToXyzMatrix ()
 
void setTransferFunction ()
 
void identifyColorSpace ()
 
void setTransferFunctionTable (const QList< uint16_t > &transferFunctionTable)
 
void setTransferFunctionTables (const QList< uint16_t > &redTransferFunctionTable, const QList< uint16_t > &greenTransferFunctionTable, const QList< uint16_t > &blueTransferFunctionTable)
 
QColorTransform transformationToColorSpace (const QColorSpacePrivate *out) const
 
QColorTransform transformationToXYZ () const
 
bool isThreeComponentMatrix () const
 
void clearElementListProcessingForEdit ()
 
- Public Member Functions inherited from QSharedData
 QSharedData () noexcept
 Constructs a QSharedData object with a reference count of 0.
 
 QSharedData (const QSharedData &) noexcept
 Constructs a QSharedData object with reference count 0.
 
QSharedDataoperator= (const QSharedData &)=delete
 
 ~QSharedData ()=default
 

Static Public Member Functions

static const QColorSpacePrivateget (const QColorSpace &colorSpace)
 
static QColorSpacePrivateget (QColorSpace &colorSpace)
 

Public Attributes

QColorSpace::NamedColorSpace namedColorSpace = Unknown
 
QColorSpace::Primaries primaries = QColorSpace::Primaries::Custom
 
QColorSpace::TransferFunction transferFunction = QColorSpace::TransferFunction::Custom
 
QColorSpace::TransformModel transformModel = QColorSpace::TransformModel::ThreeComponentMatrix
 
QColorSpace::ColorModel colorModel = QColorSpace::ColorModel::Undefined
 
float gamma = 0.0f
 
QColorVector whitePoint
 
QColorTrc trc [3]
 
QColorMatrix toXyz
 
QColorMatrix chad
 
bool isPcsLab = false
 
QList< ElementmAB
 
QList< ElementmBA
 
QString description
 
QString userDescription
 
QByteArray iccProfile
 
struct QColorSpacePrivate::LUT lut
 
- Public Attributes inherited from QSharedData
QAtomicInt ref
 

Static Public Attributes

static constexpr QColorSpace::NamedColorSpace Unknown = QColorSpace::NamedColorSpace(0)
 
static Q_CONSTINIT QBasicMutex s_lutWriteLock
 

Detailed Description

Definition at line 56 of file qcolorspace_p.h.

Member Typedef Documentation

◆ Element

Constructor & Destructor Documentation

◆ QColorSpacePrivate() [1/10]

QColorSpacePrivate::QColorSpacePrivate ( )

Definition at line 100 of file qcolorspace.cpp.

◆ QColorSpacePrivate() [2/10]

QColorSpacePrivate::QColorSpacePrivate ( QColorSpace::NamedColorSpace namedColorSpace)

Definition at line 104 of file qcolorspace.cpp.

References QColorSpace::AdobeRgb, QColorSpace::DciP3D65, description, QColorSpace::DisplayP3, QColorSpace::Gamma, gamma, initialize(), QColorSpace::Linear, namedColorSpace, primaries, QColorSpace::ProPhotoRgb, QStringLiteral, QColorSpace::SRgb, QColorSpace::SRgbLinear, and transferFunction.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [3/10]

QColorSpacePrivate::QColorSpacePrivate ( QColorSpace::Primaries primaries,
QColorSpace::TransferFunction transferFunction,
float gamma )

Definition at line 141 of file qcolorspace.cpp.

◆ QColorSpacePrivate() [4/10]

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

Definition at line 196 of file qcolorspace.cpp.

References identifyColorSpace(), initialize(), and setTransferFunctionTable().

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [5/10]

QColorSpacePrivate::QColorSpacePrivate ( const QColorSpacePrimaries & primaries,
QColorSpace::TransferFunction transferFunction,
float gamma )

Definition at line 151 of file qcolorspace.cpp.

References chad, QColorMatrix::chromaticAdaptation(), identifyColorSpace(), primaries, Q_ASSERT, setTransferFunction(), toXyz, and whitePoint.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [6/10]

QColorSpacePrivate::QColorSpacePrivate ( const QColorSpacePrimaries & primaries,
const QList< uint16_t > & transferFunctionTable )

Definition at line 207 of file qcolorspace.cpp.

References chad, QColorMatrix::chromaticAdaptation(), identifyColorSpace(), initialize(), primaries, Q_ASSERT, setTransferFunctionTable(), toXyz, and whitePoint.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [7/10]

QColorSpacePrivate::QColorSpacePrivate ( const QColorSpacePrimaries & primaries,
const QList< uint16_t > & redTransferFunctionTable,
const QList< uint16_t > & greenTransferFunctionTable,
const QList< uint16_t > & blueRransferFunctionTable )

Definition at line 223 of file qcolorspace.cpp.

References chad, QColorMatrix::chromaticAdaptation(), QColorVector::fromXYChromaticity(), identifyColorSpace(), primaries, Q_ASSERT, setTransferFunctionTables(), toXyz, and whitePoint.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [8/10]

QColorSpacePrivate::QColorSpacePrivate ( const QPointF & whitePoint,
QColorSpace::TransferFunction transferFunction,
float gamma )

Definition at line 169 of file qcolorspace.cpp.

References chad, QColorMatrix::chromaticAdaptation(), setTransferFunction(), and toXyz.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [9/10]

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

Definition at line 183 of file qcolorspace.cpp.

References chad, QColorMatrix::chromaticAdaptation(), setTransferFunction(), setTransferFunctionTable(), and toXyz.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [10/10]

QColorSpacePrivate::QColorSpacePrivate ( const QColorSpacePrivate & other)
default

Member Function Documentation

◆ clearElementListProcessingForEdit()

void QColorSpacePrivate::clearElementListProcessingForEdit ( )

Definition at line 464 of file qcolorspace.cpp.

References QList< T >::clear(), colorModel, QColorSpace::Custom, QColorSpace::ElementListProcessing, isPcsLab, mAB, mBA, primaries, Q_ASSERT, QColorSpace::Rgb, QColorSpace::ThreeComponentMatrix, transferFunction, and transformModel.

Referenced by QColorSpace::setPrimaries(), QColorSpace::setPrimaries(), QColorSpace::setTransferFunction(), QColorSpace::setTransferFunction(), QColorSpace::setTransferFunctions(), and QColorSpace::setWhitePoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ equals()

bool QColorSpacePrivate::equals ( const QColorSpacePrivate * other) const

Definition at line 1215 of file qcolorspace.cpp.

References colorModel, compareElements(), QList< T >::count(), QColorSpace::Custom, QColorSpace::Gamma, gamma, i, iccProfile, QByteArray::isEmpty(), isPcsLab, isThreeComponentMatrix(), isValid(), mAB, mBA, namedColorSpace, other(), primaries, qAbs(), toXyz, transferFunction, transformModel, and trc.

Referenced by QColorTransformPrivate::isIdentity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [1/2]

static const QColorSpacePrivate * QColorSpacePrivate::get ( const QColorSpace & colorSpace)
inlinestatic

Definition at line 73 of file qcolorspace_p.h.

References QExplicitlySharedDataPointer< T >::get().

Referenced by convert_ARGB_to_gray16(), convert_ARGB_to_gray8(), convert_Indexed8_to_Grayscale8(), convert_RGBA64_to_gray16(), convert_RGBA64_to_gray8(), destStoreGray16(), destStoreGray8(), QIcc::fromIccProfile(), QQuickColorSpaceValueType::namedColorSpace(), QPngHandlerPrivate::readPngHeader(), and QIcc::toIccProfile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [2/2]

static QColorSpacePrivate * QColorSpacePrivate::get ( QColorSpace & colorSpace)
inlinestatic

Definition at line 78 of file qcolorspace_p.h.

References QExplicitlySharedDataPointer< T >::get().

+ Here is the call graph for this function:

◆ identifyColorSpace()

void QColorSpacePrivate::identifyColorSpace ( )

Definition at line 243 of file qcolorspace.cpp.

References QColorSpace::AdobeRgb, QColorSpace::DciP3D65, description, QColorSpace::DisplayP3, QColorSpace::Gamma, gamma, QString::isEmpty(), QColorSpace::Linear, namedColorSpace, primaries, QColorSpace::ProPhotoRgb, qAbs(), QStringLiteral, QColorSpace::SRgb, QColorSpace::SRgbLinear, transferFunction, and Unknown.

Referenced by QColorSpacePrivate(), QColorSpacePrivate(), QColorSpacePrivate(), QColorSpacePrivate(), QColorSpace::setPrimaries(), QColorSpace::setPrimaries(), QColorSpace::setTransferFunction(), QColorSpace::setTransferFunction(), QColorSpace::setTransferFunctions(), and QColorSpace::setWhitePoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize()

void QColorSpacePrivate::initialize ( )

Definition at line 302 of file qcolorspace.cpp.

References setToXyzMatrix(), and setTransferFunction().

Referenced by QColorSpacePrivate(), QColorSpacePrivate(), and QColorSpacePrivate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isThreeComponentMatrix()

bool QColorSpacePrivate::isThreeComponentMatrix ( ) const

◆ isValid()

bool QColorSpacePrivate::isValid ( ) const
noexcept

Definition at line 1123 of file qcolorspace.cpp.

References colorModel, QColorSpace::Gray, QList< T >::isEmpty(), isThreeComponentMatrix(), QColorMatrix::isValid(), isValid(), mAB, toXyz, and trc.

Referenced by equals(), QColorSpace::isValid(), isValid(), and QColorSpace::isValidTarget().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setToXyzMatrix()

void QColorSpacePrivate::setToXyzMatrix ( )

Definition at line 308 of file qcolorspace.cpp.

References chad, QColorMatrix::chromaticAdaptation(), QColorSpace::Custom, QColorVector::D50(), QColorVector::fromXYChromaticity(), primaries, toXyz, and whitePoint.

Referenced by initialize(), and QColorSpace::setPrimaries().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTransferFunction()

void QColorSpacePrivate::setTransferFunction ( )

Definition at line 389 of file qcolorspace.cpp.

References QColorSpace::Custom, QColorTransferFunction::fromGamma(), QColorTransferFunction::fromProPhotoRgb(), QColorTransferFunction::fromSRgb(), QColorSpace::Gamma, gamma, QColorSpace::Linear, lut, QColorTrc::m_fun, QColorTrc::m_type, QColorSpace::ProPhotoRgb, qFuzzyIsNull(), QColorSpace::SRgb, transferFunction, and trc.

Referenced by QColorSpacePrivate(), QColorSpacePrivate(), QColorSpacePrivate(), initialize(), QColorSpace::setTransferFunction(), and QColorSpace::setTransferFunction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTransferFunctionTable()

void QColorSpacePrivate::setTransferFunctionTable ( const QList< uint16_t > & transferFunctionTable)

Definition at line 322 of file qcolorspace.cpp.

References QColorSpace::Custom, gamma, QColorTransferFunction::isIdentity(), QColorTransferFunction::isSRgb(), QColorSpace::Linear, QColorTrc::m_fun, QColorTrc::m_table, QColorTrc::m_type, qWarning, QColorSpace::SRgb, transferFunction, and trc.

Referenced by QColorSpacePrivate(), QColorSpacePrivate(), QColorSpacePrivate(), and QColorSpace::setTransferFunction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTransferFunctionTables()

void QColorSpacePrivate::setTransferFunctionTables ( const QList< uint16_t > & redTransferFunctionTable,
const QList< uint16_t > & greenTransferFunctionTable,
const QList< uint16_t > & blueTransferFunctionTable )

Definition at line 348 of file qcolorspace.cpp.

References QColorSpace::Custom, lut, QColorTrc::m_fun, QColorTrc::m_table, QColorTrc::m_type, qWarning, transferFunction, and trc.

Referenced by QColorSpacePrivate(), and QColorSpace::setTransferFunctions().

+ Here is the caller graph for this function:

◆ transformationToColorSpace()

QColorTransform QColorSpacePrivate::transformationToColorSpace ( const QColorSpacePrivate * out) const

Definition at line 425 of file qcolorspace.cpp.

References QColorMatrix::identity(), isThreeComponentMatrix(), out, ptr(), Q_ASSERT, and toXyz.

Referenced by QColorSpace::transformationToColorSpace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ transformationToXYZ()

QColorTransform QColorSpacePrivate::transformationToXYZ ( ) const

Definition at line 444 of file qcolorspace.cpp.

References QColorMatrix::chromaticAdaptation(), QColorMatrix::identity(), isThreeComponentMatrix(), ptr(), toXyz, and whitePoint.

+ Here is the call graph for this function:

Member Data Documentation

◆ chad

◆ colorModel

◆ description

◆ gamma

◆ iccProfile

◆ isPcsLab

◆ lut

◆ mAB

◆ mBA

◆ namedColorSpace

QColorSpace::NamedColorSpace QColorSpacePrivate::namedColorSpace = Unknown

Definition at line 101 of file qcolorspace_p.h.

Referenced by QColorSpacePrivate(), equals(), and identifyColorSpace().

◆ primaries

◆ s_lutWriteLock

QT_BEGIN_NAMESPACE Q_CONSTINIT QBasicMutex QColorSpacePrivate::s_lutWriteLock
static

◆ toXyz

◆ transferFunction

◆ transformModel

◆ trc

◆ Unknown

constexpr QColorSpace::NamedColorSpace QColorSpacePrivate::Unknown = QColorSpace::NamedColorSpace(0)
staticconstexpr

Definition at line 100 of file qcolorspace_p.h.

Referenced by identifyColorSpace().

◆ userDescription

QString QColorSpacePrivate::userDescription

Definition at line 126 of file qcolorspace_p.h.

Referenced by QColorSpace::description(), and QColorSpace::setDescription().

◆ whitePoint


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