diff options
-rw-r--r-- | src/effects/OpacityMask.qml | 19 | ||||
-rw-r--r-- | src/effects/doc/src/qtgraphicaleffects.qdoc | 6 | ||||
-rw-r--r-- | src/effects/plugin.cpp | 2 | ||||
-rw-r--r-- | src/effects/private/plugin.cpp | 2 | ||||
-rw-r--r-- | tools/pngdumper/pngdumper.pro | 8 | ||||
-rw-r--r-- | tools/pngdumper/pngdumper_plugin.h | 2 |
6 files changed, 28 insertions, 11 deletions
diff --git a/src/effects/OpacityMask.qml b/src/effects/OpacityMask.qml index 6653ddf..c4c5f7a 100644 --- a/src/effects/OpacityMask.qml +++ b/src/effects/OpacityMask.qml @@ -114,6 +114,21 @@ Item { */ property bool cached: false + /*! + This property controls how the alpha values of the sourceMask will behave. + + If this property is \c false, the resulting opacity is the source alpha + multiplied with the mask alpha, \c{As * Am}. + + If this property is \c true, the resulting opacity is the source alpha + multiplied with the inverse of the mask alpha, \c{As * (1 - Am)}. + + The default is \c false. + + \since 5.7 + */ + property bool invert: false + SourceProxy { id: sourceProxy input: rootItem.source @@ -147,7 +162,9 @@ Item { uniform lowp sampler2D source; uniform lowp sampler2D maskSource; void main(void) { - gl_FragColor = texture2D(source, qt_TexCoord0.st) * (texture2D(maskSource, qt_TexCoord0.st).a) * qt_Opacity; + gl_FragColor = texture2D(source, qt_TexCoord0.st) * (" + + (invert ? "1.0 - " : "") + + "texture2D(maskSource, qt_TexCoord0.st).a) * qt_Opacity; } " } diff --git a/src/effects/doc/src/qtgraphicaleffects.qdoc b/src/effects/doc/src/qtgraphicaleffects.qdoc index 32977e5..39c2f54 100644 --- a/src/effects/doc/src/qtgraphicaleffects.qdoc +++ b/src/effects/doc/src/qtgraphicaleffects.qdoc @@ -75,8 +75,10 @@ documentation contains property descriptions and basic usage examples. Currently there is no C++ API. -\section1 Effects +\section1 Reference -The \l{Graphical Effects} page has a list of the effects available. +\list +\li \l {Graphical Effects}{QML Types} +\endlist */ diff --git a/src/effects/plugin.cpp b/src/effects/plugin.cpp index 8b4ba4e..36ead7a 100644 --- a/src/effects/plugin.cpp +++ b/src/effects/plugin.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE class QtGraphicalEffectsPlugin : public QQmlExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: QtGraphicalEffectsPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } diff --git a/src/effects/private/plugin.cpp b/src/effects/private/plugin.cpp index 8db3c5e..2e5b17a 100644 --- a/src/effects/private/plugin.cpp +++ b/src/effects/private/plugin.cpp @@ -61,7 +61,7 @@ static QObject *qgfxshaderbuilder_provider(QQmlEngine *, QJSEngine *) class QtGraphicalEffectsPrivatePlugin : public QQmlExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: QtGraphicalEffectsPrivatePlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } diff --git a/tools/pngdumper/pngdumper.pro b/tools/pngdumper/pngdumper.pro index 8a6a50b..d29e50f 100644 --- a/tools/pngdumper/pngdumper.pro +++ b/tools/pngdumper/pngdumper.pro @@ -20,11 +20,9 @@ OTHER_FILES = qmldir \ ItemModel.qml !equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target + cpqmldir.files = qmldir + cpqmldir.path = $$OUT_PWD + COPIES += cpqmldir } qmldir.files = qmldir diff --git a/tools/pngdumper/pngdumper_plugin.h b/tools/pngdumper/pngdumper_plugin.h index c26452f..139cc80 100644 --- a/tools/pngdumper/pngdumper_plugin.h +++ b/tools/pngdumper/pngdumper_plugin.h @@ -34,7 +34,7 @@ class ItemcapturerPlugin : public QQmlExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: void registerTypes(const char *uri); |