Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QColorSpacePrivate Class Reference

#include <qcolorspace_p.h>

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

Classes

struct  LUT
 

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 QColorSpacePrivate &other)=default
 
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
 
- 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
 
float gamma = 0.0f
 
QColorVector whitePoint
 
QColorTrc trc [3]
 
QColorMatrix toXyz
 
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 55 of file qcolorspace_p.h.

Constructor & Destructor Documentation

◆ QColorSpacePrivate() [1/8]

QColorSpacePrivate::QColorSpacePrivate ( )

Definition at line 129 of file qcolorspace.cpp.

◆ QColorSpacePrivate() [2/8]

QColorSpacePrivate::QColorSpacePrivate ( QColorSpace::NamedColorSpace  namedColorSpace)

Definition at line 133 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/8]

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

Definition at line 169 of file qcolorspace.cpp.

References identifyColorSpace(), and initialize().

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [4/8]

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

Definition at line 192 of file qcolorspace.cpp.

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

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [5/8]

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

Definition at line 178 of file qcolorspace.cpp.

References identifyColorSpace(), primaries, Q_ASSERT, setTransferFunction(), toXyz, and whitePoint.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [6/8]

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

Definition at line 202 of file qcolorspace.cpp.

References identifyColorSpace(), initialize(), primaries, Q_ASSERT, setTransferFunctionTable(), toXyz, and whitePoint.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [7/8]

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

Definition at line 215 of file qcolorspace.cpp.

References identifyColorSpace(), primaries, Q_ASSERT, setToXyzMatrix(), setTransferFunctionTables(), toXyz, and whitePoint.

+ Here is the call graph for this function:

◆ QColorSpacePrivate() [8/8]

QColorSpacePrivate::QColorSpacePrivate ( const QColorSpacePrivate other)
default

Member Function Documentation

◆ get() [1/2]

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

Definition at line 70 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 75 of file qcolorspace_p.h.

References QExplicitlySharedDataPointer< T >::get().

+ Here is the call graph for this function:

◆ identifyColorSpace()

void QColorSpacePrivate::identifyColorSpace ( )

Definition at line 233 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(), QColorSpacePrivate(), QIcc::fromIccProfile(), QColorSpace::setPrimaries(), QColorSpace::setPrimaries(), QColorSpace::setTransferFunction(), QColorSpace::setTransferFunction(), and QColorSpace::setTransferFunctions().

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

◆ initialize()

void QColorSpacePrivate::initialize ( )

Definition at line 292 of file qcolorspace.cpp.

References setToXyzMatrix(), and setTransferFunction().

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

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

◆ setToXyzMatrix()

void QColorSpacePrivate::setToXyzMatrix ( )

Definition at line 298 of file qcolorspace.cpp.

References QColorSpace::Custom, QColorVector::D50(), primaries, toXyz, QColorSpacePrimaries::toXyzMatrix(), QColorSpacePrimaries::whitePoint, and whitePoint.

Referenced by QColorSpacePrivate(), QIcc::fromIccProfile(), 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 377 of file qcolorspace.cpp.

References QColorSpace::Custom, QColorTransferFunction::fromGamma(), QColorTransferFunction::fromProPhotoRgb(), QColorTransferFunction::fromSRgb(), QColorSpace::Gamma, gamma, QColorSpacePrivate::LUT::generated, QColorSpace::Linear, lut, QColorTrc::m_fun, QColorTrc::m_type, QColorSpace::ProPhotoRgb, qFuzzyIsNull(), QColorSpace::SRgb, QBasicAtomicInteger< T >::storeRelease(), transferFunction, and trc.

Referenced by 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 310 of file qcolorspace.cpp.

References QColorSpace::Custom, gamma, QColorTransferFunction::isLinear(), QColorTransferFunction::isSRgb(), QColorSpace::Linear, QColorTrc::m_fun, QColorTrc::m_table, QColorTrc::m_type, qWarning, QList< T >::size(), QColorSpace::SRgb, transferFunction, and trc.

Referenced by 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 336 of file qcolorspace.cpp.

References QColorTransferTable::asColorTransferFunction(), QColorTransferTable::checkValidity(), QColorSpace::Custom, QColorSpacePrivate::LUT::generated, QColorTransferTable::isEmpty(), lut, QColorTrc::m_fun, QColorTrc::m_table, QColorTrc::m_type, qWarning, QList< T >::size(), QBasicAtomicInteger< T >::storeRelease(), transferFunction, and trc.

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

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

◆ transformationToColorSpace()

QColorTransform QColorSpacePrivate::transformationToColorSpace ( const QColorSpacePrivate out) const

Definition at line 413 of file qcolorspace.cpp.

References 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 427 of file qcolorspace.cpp.

References ptr(), and toXyz.

Referenced by convert_ARGB_to_gray16(), convert_ARGB_to_gray8(), convert_Indexed8_to_Grayscale8(), convert_RGBA64_to_gray16(), convert_RGBA64_to_gray8(), destStoreGray16(), and destStoreGray8().

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

Member Data Documentation

◆ description

◆ gamma

◆ iccProfile

QByteArray QColorSpacePrivate::iccProfile

◆ lut

◆ namedColorSpace

QColorSpace::NamedColorSpace QColorSpacePrivate::namedColorSpace = Unknown

Definition at line 92 of file qcolorspace_p.h.

Referenced by QColorSpacePrivate(), QIcc::fromIccProfile(), and identifyColorSpace().

◆ primaries

◆ s_lutWriteLock

QT_BEGIN_NAMESPACE Q_CONSTINIT QBasicMutex QColorSpacePrivate::s_lutWriteLock
static

◆ toXyz

◆ transferFunction

◆ trc

◆ Unknown

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

Definition at line 91 of file qcolorspace_p.h.

Referenced by identifyColorSpace().

◆ userDescription

QString QColorSpacePrivate::userDescription

Definition at line 103 of file qcolorspace_p.h.

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

◆ whitePoint


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