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

The QColorTransform class is a transformation between color spaces. More...

#include <qcolortransform.h>

+ Collaboration diagram for QColorTransform:

Public Member Functions

 QColorTransform () noexcept=default
 
Q_GUI_EXPORT ~QColorTransform ()
 
Q_GUI_EXPORT QColorTransform (const QColorTransform &colorTransform) noexcept
 
 QColorTransform (QColorTransform &&colorTransform)=default
 
QColorTransformoperator= (const QColorTransform &other) noexcept
 
void swap (QColorTransform &other) noexcept
 
Q_GUI_EXPORT bool isIdentity () const noexcept
 
Q_GUI_EXPORT QRgb map (QRgb argb) const
 Applies the color transformation on the QRgb value argb.
 
Q_GUI_EXPORT QRgba64 map (QRgba64 rgba64) const
 Applies the color transformation on the QRgba64 value rgba64.
 
Q_GUI_EXPORT QRgbaFloat16 map (QRgbaFloat16 rgbafp16) const
 Applies the color transformation on the QRgbaFloat16 value rgbafp16.
 
Q_GUI_EXPORT QRgbaFloat32 map (QRgbaFloat32 rgbafp32) const
 Applies the color transformation on the QRgbaFloat32 value rgbafp32.
 
Q_GUI_EXPORT QColor map (const QColor &color) const
 Applies the color transformation on the QColor value color.
 

Friends

class QColorSpacePrivate
 
class QColorTransformPrivate
 
bool operator== (const QColorTransform &ct1, const QColorTransform &ct2)
 
bool operator!= (const QColorTransform &ct1, const QColorTransform &ct2)
 

Detailed Description

The QColorTransform class is a transformation between color spaces.

Since
5.14

\inmodule QtGui

QColorTransform is an instantiation of a transformation between color spaces. It can be applied on color and pixels to convert them from one color space to another.

Setting up a QColorTransform takes some preprocessing, so keeping around QColorTransforms that you need often is recommended, instead of generating them on the fly.

Definition at line 25 of file qcolortransform.h.

Constructor & Destructor Documentation

◆ QColorTransform() [1/3]

QColorTransform::QColorTransform ( )
defaultnoexcept

◆ ~QColorTransform()

QColorTransform::~QColorTransform ( )
default

◆ QColorTransform() [2/3]

QColorTransform::QColorTransform ( const QColorTransform & colorTransform)
defaultnoexcept

◆ QColorTransform() [3/3]

QColorTransform::QColorTransform ( QColorTransform && colorTransform)
default

Member Function Documentation

◆ isIdentity()

bool QColorTransform::isIdentity ( ) const
noexcept
Since
6.4 Returns true if the color transform is the identity transform.

Definition at line 113 of file qcolortransform.cpp.

References d, and isIdentity().

Referenced by isIdentity().

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

◆ map() [1/5]

QColor QColorTransform::map ( const QColor & color) const

Applies the color transformation on the QColor value color.

Definition at line 243 of file qcolortransform.cpp.

References QColor::Cmyk, QColorSpace::Cmyk, QColorSpacePrivate::colorModel, QColorTransformPrivate::colorSpaceIn, QColorTransformPrivate::colorSpaceOut, QColor::ExtendedRgb, QColorTransformPrivate::mapExtended(), out, QColor::Rgb, QColorSpace::Rgb, QColor::toCmyk(), and QColor::toRgb().

+ Here is the call graph for this function:

◆ map() [2/5]

QRgb QColorTransform::map ( QRgb argb) const

Applies the color transformation on the QRgb value argb.

The input should be opaque or unpremultiplied.

Definition at line 178 of file qcolortransform.cpp.

References QColorTransformPrivate::map(), qAlpha(), qBlue(), qGreen(), qRed(), and qRgba().

Referenced by convert_Indexed8_to_Grayscale8().

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

◆ map() [3/5]

QRgba64 QColorTransform::map ( QRgba64 rgba64) const

Applies the color transformation on the QRgba64 value rgba64.

The input should be opaque or unpremultiplied.

Definition at line 193 of file qcolortransform.cpp.

References QRgba64::alpha(), QRgba64::blue(), QRgba64::fromRgba64(), QRgba64::green(), QColorTransformPrivate::map(), and QRgba64::red().

+ Here is the call graph for this function:

◆ map() [4/5]

QRgbaFloat16 QColorTransform::map ( QRgbaFloat16 rgbafp16) const

Applies the color transformation on the QRgbaFloat16 value rgbafp16.

The input should be opaque or unpremultiplied.

Since
6.4

Definition at line 209 of file qcolortransform.cpp.

References QColorTransformPrivate::mapExtended().

+ Here is the call graph for this function:

◆ map() [5/5]

QRgbaFloat32 QColorTransform::map ( QRgbaFloat32 rgbafp32) const

Applies the color transformation on the QRgbaFloat32 value rgbafp32.

The input should be opaque or unpremultiplied.

Since
6.4

Definition at line 227 of file qcolortransform.cpp.

References QColorTransformPrivate::mapExtended(), and QColorVector::x.

+ Here is the call graph for this function:

◆ operator=()

QColorTransform & QColorTransform::operator= ( const QColorTransform & other)
inlinenoexcept

Definition at line 32 of file qcolortransform.h.

References other().

+ Here is the call graph for this function:

◆ swap()

void QColorTransform::swap ( QColorTransform & other)
inlinenoexcept

Definition at line 39 of file qcolortransform.h.

References d, and other().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool QColorTransform::operator!= ( const QColorTransform & ct1,
const QColorTransform & ct2 )
friend
Since
6.4 Returns true if ct1 does not define the same transformation as ct2.

Definition at line 50 of file qcolortransform.h.

◆ operator==

bool QColorTransform::operator== ( const QColorTransform & ct1,
const QColorTransform & ct2 )
friend
Since
6.4 Returns true if ct1 defines the same color transformation as ct2.

Definition at line 48 of file qcolortransform.h.

◆ QColorSpacePrivate

friend class QColorSpacePrivate
friend

Definition at line 54 of file qcolortransform.h.

◆ QColorTransformPrivate

friend class QColorTransformPrivate
friend

Definition at line 55 of file qcolortransform.h.


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