圖形效果

Effects are visual items that can be added to Qt Quick user interface as UI components. To import the Qt Graphical Effects types, include the Qt Graphical Effects module by adding the following statement to the QML file:

import QtGraphicalEffects 1.12
					

To use the effects, simply add a specific effect declaration to the QML scene and configure the effects properties. The source item type can be any QML type, even video or another effect. Pipelining multiple effects together is a simple way to create even more impressive output.

The following list presents the functional division of types that are part of Qt Graphical Effects:

融閤

融閤 通過使用融閤方式閤並 2 源項

顔色

BrightnessContrast Adjusts brightness and contrast
ColorOverlay Alters the colors of the source item by applying an overlay color
Colorize Sets the color in the HSL color space
Desaturate Reduces the saturation of the colors
GammaAdjust Alters the luminance of the source item
HueSaturation Alters the source item colors in the HSL color space
LevelAdjust Adjusts color levels in the RGBA color space

漸變

ConicalGradient 繪製錐形漸變
LinearGradient 繪製綫性漸變
RadialGradient 繪製徑嚮漸變

失真

Displace Moves the pixels of the source item according to the given displacement map

投影

DropShadow Generates a soft shadow behind the source item
InnerShadow Generates a colorized and blurred shadow inside the source

模糊

FastBlur Applies a fast blur effect to one or more source items
GaussianBlur 應用更高質量的模糊效果
MaskedBlur Applies a blur effect with a varying intesity
RecursiveBlur Blurs repeatedly, providing a strong blur effect

運動模糊

DirectionalBlur 把模糊效果應用到指定方嚮
RadialBlur Applies directional blur in a circular direction around the items center point
ZoomBlur Applies directional blur effect towards source items center point

輝光

輝光 Generates a halo like glow around the source item
RectangularGlow Generates a blurred and colorized rectangle, which gives the impression that the source is glowing

掩碼

OpacityMask Masks the source item with another item
ThresholdMask Masks the source item with another item and applies a threshold value