HueSaturation QML Type
HSL 色空間のソースアイテムの色を変更します。詳細...
Import Statement: | import Qt5Compat.GraphicalEffects |
Since: | QtGraphicalEffects 1.0 |
Inherits: |
プロパティ
- cached : bool
- hue : real
- lightness : real
- saturation : real
- source : variant
詳細説明
HueSaturation はColorize エフェクトに似ていますが、色相と彩度のプロパティ値の扱いが異なります。HueSaturation エフェクトは、色相、彩度、明度を設定する代わりに、常にオリジナルからシフトします。
ソース | 適用される効果 |
---|---|
適用例
次の例は、エフェクトを適用する方法を示しています。
import QtQuick import Qt5Compat.GraphicalEffects Item { width: 300 height: 300 Image { id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true visible: false } HueSaturation { anchors.fill: bug source: bug hue: -0.3 saturation: 0.5 lightness: -0.1 } }
プロパティの説明
cached : bool |
このプロパティは、レンダリングのパフォーマンスを向上させるために、エフェクトの出力ピクセルをキャッシュできるようにします。
ソースまたはエフェクトのプロパティが変更されるたびに、キャッシュ内のピクセルを更新する必要があります。エフェクト出力を保存するために余分なメモリバッファが必要になるため、メモリ消費量が増加します。
ソースまたはエフェクトプロパティがアニメーションするときは、キャッシュを無効にすることをお勧めします。
デフォルトでは、このプロパティはfalse
に設定されています。
hue : real |
このプロパティは、ソースの色相値に追加される色相値を定義します。
値の範囲は -1.0(減少)から 1.0(増加)です。デフォルトでは、このプロパティは0.0
(変化なし)に設定されています。
色相値を変えた出力例 | ||
---|---|---|
色相:-0.3 | 色相:0.0 | 色相:0.3 |
saturation:0 | saturation:0 | saturation:0 |
lightness:0 | lightness:0 | lightness:0 |
lightness : real |
このプロパティは、ソースの彩度値に加算される明度値を定義する。
値の範囲は、-1.0(減少)~1.0(増加)です。デフォルトでは、このプロパティは0.0
(変化なし)に設定されています。
明度値を変えた出力例 | ||
---|---|---|
明度:-0.5 | 明度:0.0 | 明度:0.5 |
hue:0 | hue:0 | hue:0 |
saturation:0 | saturation:0 | saturation:0 |
saturation : real |
source : variant |
このプロパティは、エフェクトのソースピクセルを提供するソースアイテムを定義する。
注意: 例えば、source をエフェクトの親に設定することによって、エフェクトがそれ自身を含むようにすることはサポートされていません。
© 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.