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
QColorTransformPrivate Class Reference

#include <qcolortransform_p.h>

+ Inheritance diagram for QColorTransformPrivate:
+ Collaboration diagram for QColorTransformPrivate:

Public Types

enum  TransformFlag {
  Unpremultiplied = 0 , InputOpaque = 1 , InputPremultiplied = 2 , OutputPremultiplied = 4 ,
  Premultiplied = (InputPremultiplied | OutputPremultiplied)
}
 

Public Member Functions

void updateLutsIn () const
 
void updateLutsOut () const
 
bool isIdentity () const
 
bool isThreeComponentMatrix () const
 
Q_GUI_EXPORT void prepare ()
 
QColorVector map (QColorVector color) const
 
QColorVector mapExtended (QColorVector color) const
 
template<typename D , typename S >
void apply (D *dst, const S *src, qsizetype count, TransformFlags flags) const
 
template<typename D , typename S >
void applyGray (D *dst, const S *src, qsizetype count, TransformFlags flags) const
 
template<typename D , typename S >
void applyReturnGray (D *dst, const S *src, qsizetype count, TransformFlags flags) 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 QColorTransformPrivateget (const QColorTransform &q)
 

Public Attributes

QColorMatrix colorMatrix
 
QExplicitlySharedDataPointer< const QColorSpacePrivatecolorSpaceIn
 
QExplicitlySharedDataPointer< const QColorSpacePrivatecolorSpaceOut
 
- Public Attributes inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Definition at line 27 of file qcolortransform_p.h.

Member Enumeration Documentation

◆ TransformFlag

Defines how the transform should handle alpha values.

\value Unpremultiplied The input and output should both be unpremultiplied. \value InputOpaque The input is guaranteed to be opaque. \value InputPremultiplied The input is premultiplied. \value OutputPremultiplied The output should be premultiplied. \value Premultiplied Both input and output should both be premultiplied.

Enumerator
Unpremultiplied 
InputOpaque 
InputPremultiplied 
OutputPremultiplied 
Premultiplied 

Definition at line 43 of file qcolortransform_p.h.

Member Function Documentation

◆ apply()

template<typename D , typename S >
template void QColorTransformPrivate::apply< QRgbaFloat32, QRgbaFloat32 > ( D * dst,
const S * src,
qsizetype count,
TransformFlags flags ) const

Applies the color transformation on count S pixels starting from src and stores the result in dst as D pixels .

Assumes unpremultiplied data by default. Set flags to change defaults.

See also
prepare()

Definition at line 1782 of file qcolortransform.cpp.

References isThreeComponentMatrix().

+ Here is the call graph for this function:

◆ applyGray()

template<typename D , typename S >
template void QColorTransformPrivate::applyGray< QRgba64, quint16 > ( D * dst,
const S * src,
qsizetype count,
TransformFlags flags ) const

Definition at line 1857 of file qcolortransform.cpp.

References colorMatrix, colorSpaceIn, colorSpaceOut, i, QColorSpacePrivate::isPcsLab, QColorSpacePrivate::isThreeComponentMatrix(), QColorMatrix::isValid(), j, loadGray(), QColorSpacePrivate::mBA, Q_ASSERT, qMin(), storeOpaque(), storeUnpremultipliedLUT(), updateLutsIn(), updateLutsOut(), visitElement(), and WorkBlockSize.

+ Here is the call graph for this function:

◆ applyReturnGray()

template<typename D , typename S >
template void QColorTransformPrivate::applyReturnGray< quint16, QRgba64 > ( D * dst,
const S * src,
qsizetype count,
TransformFlags flags ) const

Is to be called on a color-transform to XYZ, returns only luminance values.

Definition at line 1797 of file qcolortransform.cpp.

References colorMatrix, colorSpaceIn, colorSpaceOut, i, InputPremultiplied, QColorSpacePrivate::isPcsLab, QColorSpacePrivate::isThreeComponentMatrix(), QColorMatrix::isValid(), j, loadPremultiplied(), loadUnpremultiplied(), Q_ASSERT, qMin(), storeOpaque(), updateLutsIn(), updateLutsOut(), and WorkBlockSize.

+ Here is the call graph for this function:

◆ get()

static QColorTransformPrivate * QColorTransformPrivate::get ( const QColorTransform & q)
inlinestatic

Definition at line 34 of file qcolortransform_p.h.

Referenced by QImage::applyColorTransform(), QImage::colorTransformed(), QImage::colorTransformed(), QImage::colorTransformed(), convert_ARGB_to_gray16(), convert_ARGB_to_gray8(), convert_RGBA64_to_gray16(), convert_RGBA64_to_gray8(), destStoreGray16(), and destStoreGray8().

+ Here is the caller graph for this function:

◆ isIdentity()

bool QColorTransformPrivate::isIdentity ( ) const

Definition at line 1985 of file qcolortransform.cpp.

References colorMatrix, colorSpaceIn, colorSpaceOut, QExplicitlySharedDataPointer< T >::constData(), QColorSpace::Custom, QColorSpacePrivate::equals(), QColorMatrix::isIdentity(), isThreeComponentMatrix(), QColorSpace::Linear, QColorSpacePrivate::transferFunction, and QColorSpacePrivate::trc.

+ Here is the call graph for this function:

◆ isThreeComponentMatrix()

bool QColorTransformPrivate::isThreeComponentMatrix ( ) const

Definition at line 1973 of file qcolortransform.cpp.

References colorSpaceIn, colorSpaceOut, and QColorSpacePrivate::isThreeComponentMatrix().

Referenced by apply(), and isIdentity().

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

◆ map()

QColorVector QColorTransformPrivate::map ( QColorVector c) const

Definition at line 1540 of file qcolortransform.cpp.

References QColorTrc::apply(), QColorTrc::applyInverse(), colorMatrix, colorSpaceIn, colorSpaceOut, QColorSpacePrivate::isPcsLab, QColorSpacePrivate::isThreeComponentMatrix(), QColorSpacePrivate::lut, QColorSpacePrivate::mAB, QColorMatrix::map(), QColorSpacePrivate::mBA, QColorSpacePrivate::trc, visitElement(), and QColorVector::x.

Referenced by QColorTransform::map(), and QColorTransform::map().

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

◆ mapExtended()

QColorVector QColorTransformPrivate::mapExtended ( QColorVector c) const

Definition at line 1598 of file qcolortransform.cpp.

References QColorTrc::applyExtended(), QColorTrc::applyInverseExtended(), colorMatrix, colorSpaceIn, colorSpaceOut, QColorSpacePrivate::isPcsLab, QColorSpacePrivate::isThreeComponentMatrix(), QColorVector::labToXyz(), QColorSpacePrivate::mAB, QColorMatrix::map(), QColorSpacePrivate::mBA, QColorSpacePrivate::trc, visitElement(), QColorVector::x, and QColorVector::xyzToLab().

Referenced by QColorTransform::map(), QColorTransform::map(), and QColorTransform::map().

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

◆ prepare()

void QColorTransformPrivate::prepare ( )

Prepares a color transformation for fast application. You do not need to call this explicitly as it will be called implicitly on the first transforms, but if you want predictable performance on the first transforms, you can perform it in advance.

See also
QColorTransform::map(), apply()

Definition at line 1940 of file qcolortransform.cpp.

References updateLutsIn(), and updateLutsOut().

+ Here is the call graph for this function:

◆ updateLutsIn()

void QColorTransformPrivate::updateLutsIn ( ) const

Definition at line 35 of file qcolortransform.cpp.

References colorSpaceIn, i, QColorTrc::isValid(), lock, QColorSpacePrivate::lut, lutFromTrc(), QColorSpacePrivate::s_lutWriteLock, and QColorSpacePrivate::trc.

Referenced by applyGray(), applyReturnGray(), and prepare().

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

◆ updateLutsOut()

void QColorTransformPrivate::updateLutsOut ( ) const

Definition at line 60 of file qcolortransform.cpp.

References colorSpaceOut, i, QColorTrc::isValid(), lock, QColorSpacePrivate::lut, lutFromTrc(), QColorSpacePrivate::s_lutWriteLock, and QColorSpacePrivate::trc.

Referenced by applyGray(), applyReturnGray(), and prepare().

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

Member Data Documentation

◆ colorMatrix

QColorMatrix QColorTransformPrivate::colorMatrix

Definition at line 30 of file qcolortransform_p.h.

Referenced by applyGray(), applyReturnGray(), isIdentity(), map(), and mapExtended().

◆ colorSpaceIn

◆ colorSpaceOut


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