QColorTransform Class

QColorTransform クラスは色空間間の変換です。詳細...

ヘッダー #include <QColorTransform>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui

パブリック関数

(since 6.4) bool isIdentity() const
QRgb map(QRgb argb) const
QRgba64 map(QRgba64 rgba64) const
(since 6.4) QRgbaFloat16 map(QRgbaFloat16 rgbafp16) const
(since 6.4) QRgbaFloat32 map(QRgbaFloat32 rgbafp32) const
QColor map(const QColor &color) const
(since 6.4) bool operator!=(const QColorTransform &ct1, const QColorTransform &ct2)
(since 6.4) bool operator==(const QColorTransform &ct1, const QColorTransform &ct2)

詳細な説明

QColorTransform は、色空間間の変換のインスタンス化です。色とピクセルに適用して、ある色空間から別の色空間に変換することができます。

QColorTransform を作成するには、QColorSpace::transformationToColorSpace() を使用します:

QColorSpace sourceColorSpace(QColorSpace::SRgb);
QColorSpace targetColorSpace(QColorSpace::DisplayP3);
QColorTransform srgbToP3Transform = sourceColorSpace.transformationToColorSpace(targetColorSpace);

QColorTransformのセットアップにはいくつかの前処理が必要なので、頻繁に必要となるQColorTransformは、その場で生成するのではなく、保持しておくことをお勧めします。

メンバ関数のドキュメント

[noexcept, since 6.4] bool QColorTransform::isIdentity() const

色変換が同一変換である場合に true を返します。

この関数は Qt 6.4 で導入されました。

QRgb QColorTransform::map(QRgb argb) const

QRgb の値argb に色変換を適用する。

入力は不透明であるか、乗算されていないものでなければならない。

QRgba64 QColorTransform::map(QRgba64 rgba64) const

QRgba64 の値rgba64 に色変換を適用する。

入力は不透明であるか、乗算されていないものでなければならない。

[since 6.4] QRgbaFloat16 QColorTransform::map(QRgbaFloat16 rgbafp16) const

QRgbaFloat16 の値rgbafp16 に色変換を適用する。

入力は不透明であるか、または乗算されていない必要があります。

この関数は Qt 6.4 で導入されました。

[since 6.4] QRgbaFloat32 QColorTransform::map(QRgbaFloat32 rgbafp32) const

QRgbaFloat32 の値rgbafp32 に色変換を適用する。

入力は不透明であるか、または乗算されていない必要があります。

この関数は Qt 6.4 で導入されました。

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

QColor の値color に色変換を適用する。

関連 非会員

[since 6.4] bool operator!=(const QColorTransform &ct1, const QColorTransform &ct2)

ct1ct2 と同じ変換を定義していない場合、true を返します。

この関数は Qt 6.4 で導入されました。

[since 6.4] bool operator==(const QColorTransform &ct1, const QColorTransform &ct2)

ct1ct2 と同じ色変換を定義している場合、true を返します。

この関数は Qt 6.4 で導入されました。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.