Image mask particle system differs
-
Thank you for helping me look at this problem.
I am imitating example to make particle masked.
First let me show you some screen shot:
This is desired:
!http://i1288.photobucket.com/albums/b485/jiangcaiyang/2_zps193fbb32.png(Desired)!
This is problematic, the particles are not filled:
!http://i1288.photobucket.com/albums/b485/jiangcaiyang/1_zpseea56f34.png(problematic)!
I am using these images as image mask:
TestSprite.png
!http://i1288.photobucket.com/albums/b485/jiangcaiyang/TestSprite_zpsfd77056a.png(TestSprite)!
TestSprite_2.png
!http://i1288.photobucket.com/albums/b485/jiangcaiyang/TestSprite_2_zpsde05c952.png(TestSprite_2)!
Here is all my qml code:
@import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Particles 2.0ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
property url targetImageSource: "qrc:/TestSprite_2.png"menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } } } Rectangle { width: parent.width height: parent.height color: Qt.black.toString( ) Image { id: targetImage anchors.centerIn: parent scale: 0.5 source: targetImageSource MouseArea { anchors.fill: parent onClicked: { console.log( "The button has been clicked." ); //parent.visible = false; maskParticle.start( ); } } ParticleSystem { id: maskParticle anchors.fill: parent running: false ImageParticle { source: "qrc:///particleresources/glowdot.png" z: 2 anchors.fill: parent color: "#336666CC" colorVariation: 0.0 } Emitter { anchors.fill: parent emitRate: 6000 lifeSpan: 720 size: 10 shape: MaskShape { source: targetImageSource } } } } } Text { font.family: "Aerial" font.pixelSize: 16 text: qsTr( "This is a test particle system." ) color: "#FFFFFF" }
}@
-
No any ideas?
-
Hi,
I tested your code on Ubuntu 14.04 with Qt 5.2.1 and it works as desired.
What is your development environment ?