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
qcolortransform.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QCOLORTRANSFORM_H
6#define QCOLORTRANSFORM_H
7
8#include <QtGui/qtguiglobal.h>
9#include <QtGui/qrgb.h>
10#include <QtCore/qshareddata.h>
11
13
14class QColor;
15class QRgba64;
18class qfloat16;
19template<typename T>
20class QRgbaFloat;
22typedef QRgbaFloat<float> QRgbaFloat32;
23
24QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QColorTransformPrivate, Q_GUI_EXPORT)
25
27{
28public:
29 QColorTransform() noexcept = default;
32 QColorTransform(QColorTransform &&colorTransform) = default;
33 QColorTransform &operator=(const QColorTransform &other) noexcept
34 {
35 QColorTransform{other}.swap(*this);
36 return *this;
37 }
39
40 void swap(QColorTransform &other) noexcept { d.swap(other.d); }
41 Q_GUI_EXPORT bool isIdentity() const noexcept;
42
43 Q_GUI_EXPORT QRgb map(QRgb argb) const;
44 Q_GUI_EXPORT QRgba64 map(QRgba64 rgba64) const;
45 Q_GUI_EXPORT QRgbaFloat16 map(QRgbaFloat16 rgbafp16) const;
46 Q_GUI_EXPORT QRgbaFloat32 map(QRgbaFloat32 rgbafp32) const;
47 Q_GUI_EXPORT QColor map(const QColor &color) const;
48
49 friend bool operator==(const QColorTransform &ct1, const QColorTransform &ct2)
50 { return ct1.compare(ct2); }
51 friend bool operator!=(const QColorTransform &ct1, const QColorTransform &ct2)
52 { return !ct1.compare(ct2); }
53
54private:
55 friend class QColorSpacePrivate;
57 Q_GUI_EXPORT bool compare(const QColorTransform &other) const;
58
59 QExplicitlySharedDataPointer<QColorTransformPrivate> d;
60};
61
62Q_DECLARE_SHARED(QColorTransform)
63
64QT_END_NAMESPACE
65
66#endif // QCOLORTRANSFORM_H
The QColorTransform class is a transformation between color spaces.
QColorTransform(QColorTransform &&colorTransform)=default
friend bool operator!=(const QColorTransform &ct1, const QColorTransform &ct2)
QColorTransform & operator=(const QColorTransform &other) noexcept
QColorTransform() noexcept=default
Q_GUI_EXPORT ~QColorTransform()
friend bool operator==(const QColorTransform &ct1, const QColorTransform &ct2)
Definition qmap.h:190
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
Definition qfloat16.h:57
Combined button and popup list for selecting options.
QRgbaFloat< float > QRgbaFloat32
QRgbaFloat< qfloat16 > QRgbaFloat16
Q_TRACE_METADATA(qtcore, "ENUM { AUTO, RANGE User ... MaxUser } QEvent::Type;")
#define IWX_MSB(b)
Definition qimage.cpp:4428
static QImage rotated90(const QImage &src)
Definition qimage.cpp:4781
static void copyMetadata(QImage *dst, const QImage &src)
Definition qimage.cpp:1186
#define QT_XFORM_TYPE_LSBFIRST
Definition qimage.cpp:51
static void copyMetadata(QImageData *dst, const QImageData *src)
Definition qimage.cpp:1177
#define QT_XFORM_TYPE_MSBFIRST
Definition qimage.cpp:50
static int next_qimage_serial_number()
Definition qimage.cpp:90
#define QIMAGE_SANITYCHECK_MEMORY(image)
Definition qimage.cpp:68
static void copyPhysicalMetadata(QImageData *dst, const QImageData *src)
Definition qimage.cpp:1170
#define IWX_LSB(b)
Definition qimage.cpp:4437
static QImage rotated270(const QImage &src)
Definition qimage.cpp:4825
QMap< QString, QString > qt_getImageText(const QImage &image, const QString &description)
Definition qimage.cpp:6535
Q_GUI_EXPORT void qt_imageTransform(QImage &src, QImageIOHandler::Transformations orient)
Definition qimage.cpp:6522
#define PIX(x, y)
static QImage rotated180(const QImage &src)
Definition qimage.cpp:4807
static Qt::Orientations toOrientations(QImageIOHandler::Transformations orient)
Definition qimage.cpp:6512
QMap< QString, QString > qt_getImageTextFromDescription(const QString &description)
Definition qimage.cpp:6546