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
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
 
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
 
- 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 42 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 1971 of file qcolortransform.cpp.

References updateLutsIn(), and updateLutsOut().

+ 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.

◆ isIdentity()

bool QColorTransformPrivate::isIdentity ( ) const

Definition at line 2050 of file qcolortransform.cpp.

Referenced by QColorSpacePrivate::transformationToColorSpace().

+ Here is the caller graph for this function:

◆ map()

QColorVector QColorTransformPrivate::map ( QColorVector c) const

Definition at line 1723 of file qcolortransform.cpp.

◆ mapExtended()

QColorVector QColorTransformPrivate::mapExtended ( QColorVector c) const

Definition at line 1781 of file qcolortransform.cpp.

◆ 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 2015 of file qcolortransform.cpp.

References updateLutsIn(), and updateLutsOut().

+ Here is the call graph for this function:

◆ updateLutsIn()

QT_BEGIN_NAMESPACE void QColorTransformPrivate::updateLutsIn ( ) const

Definition at line 25 of file qcolortransform.cpp.

Referenced by apply(), and prepare().

+ Here is the caller graph for this function:

◆ updateLutsOut()

void QColorTransformPrivate::updateLutsOut ( ) const

Definition at line 50 of file qcolortransform.cpp.

Referenced by apply(), and prepare().

+ Here is the caller graph for this function:

Member Data Documentation

◆ colorMatrix

QColorMatrix QColorTransformPrivate::colorMatrix

Definition at line 30 of file qcolortransform_p.h.

◆ colorSpaceIn

QExplicitlySharedDataPointer<const QColorSpacePrivate> QColorTransformPrivate::colorSpaceIn

Definition at line 31 of file qcolortransform_p.h.

◆ colorSpaceOut

QExplicitlySharedDataPointer<const QColorSpacePrivate> QColorTransformPrivate::colorSpaceOut

Definition at line 32 of file qcolortransform_p.h.


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