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 ’ 효과와 유사하지만, 색조(hue)와 채도(saturation) 속성 값을 처리하는 방식이 다릅니다. 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
이 속성은 소스 채도 값에 더해지는 채도 값을 정의합니다.
값의 범위는 -1.0(감소)부터 1.0(증가)까지입니다. 기본적으로 이 속성은 ' 0.0 '(변경 없음)로 설정되어 있습니다.
| 서로 다른 채도 값을 적용한 출력 예시 | ||
|---|---|---|
|
|
|
| saturation: -0.8 | 채도: 0.0 | 채도: 1.0 |
| hue: 0 | hue: 0 | hue: 0 |
| lightness: 0 | lightness: 0 | lightness: 0 |
source : variant
이 속성은 효과에 사용할 소스 픽셀을 제공하는 소스 항목을 정의합니다.
참고: 예를 들어 소스를 효과의 상위 요소로 설정하는 등, 효과가 스스로를 포함하도록 하는것은 지원되지않습니다 .
© 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.










