Desaturate
ImportStatement: import QtGraphicalEffects 1.0
Since: QtGraphicalEffects 1.0
Inherits: Item
Properties
cached :bool
desaturation: real
source :variant
DetailedDescription
Desaturated组件的像素值计算做源实例的原始RGB组件的平均值。
源 | 影响 |
---|---|
|
|
importQtQuick 2.0相应代码:
importQtGraphicalEffects 1.0
Item {
width: 300
height: 300
Image {
id: bug
source: "images/bug.jpg"
sourceSize: Qt.size(parent.width,parent.height)
smooth: true
visible: false
}
Desaturate {
anchors.fill: bug
source: bug
desaturation: 0.8
}
}
PropertyDocumentation
cached :bool
是否缓冲影响输出。缓冲可提高渲染效率,但会消耗更多内存。每次源或影响属性变化,都会更新缓冲。如果源或影响属性是动态的,推荐关闭缓冲。默认为假。
desaturation: real
多少源色彩被冲淡。值在0.0(不变)到1.0(冲淡)之间,默认为0
冲淡的影响 | ||
---|---|---|
|
|
|
desaturation: 0.0 | desaturation: 0.5 | desaturation: 1.0 |
source :variant
本文发布于:2024-02-04 22:20:41,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170717722260161.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |