QColorTransform Class
QColorTransform クラスは、色空間間の変換を行うクラスです。詳細...
| ヘッダー: | #include <QColorTransform> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
- 継承されたメンバーを含むすべてのメンバーの一覧
- QColorTransformは、Paintingクラス群の一部です。
パブリック関数
| QColorTransform() | |
| QColorTransform(QColorTransform &&colorTransform) | |
(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 をあらかじめ用意しておくことをお勧めします。
メンバ関数のドキュメント
[constexpr noexcept default] QColorTransform::QColorTransform()
QColorTransform のインスタンスをデフォルトコンストラクタで生成します。
[constexpr noexcept default] QColorTransform::QColorTransform(QColorTransform &&colorTransform)
QColorTransform のインスタンスをMoveコンストラクタで生成します。
[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)
ct1 がct2 と同じ変換を定義していない場合、true を返します。
この関数は Qt 6.4 で導入されました。
[since 6.4] bool operator==(const QColorTransform &ct1, const QColorTransform &ct2)
ct1 がct2 と同じ色変換を定義している場合、true を返します。
この関数は Qt 6.4 で導入されました。
© 2026 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.