How to put a particles(from ParticleSystem) in an custom user figure?
-
Hi everyone)
Recently started learning Qt Quick and his type ParticleSystem.
I have a code:
@ParticleSystem {
id: particlesystem
anchors.fill: sky
z:1000ImageParticle { id: stars source: "content/images/star.png" groups: ["stars"] opacity: .5 } Emitter { id: starsemitter anchors.fill: parent emitRate: parent.width / 10 lifeSpan: 5000 group: "stars" //shape: ellipse } }@
The question is: Can I put Particles in an custom user figure?
Of course you can easily put in a rectangle using anchors.fill or in an ellipse using Emitter property shape, but I want do the same with a circle or triangle. -
You can use an emitter with an image mask: http://qt-project.org/doc/qt-5.1/qtquick/qml-qtquick-particles2-maskshape.html
-
[quote author="sletta" date="1393487129"][/quote]
Thanks, but then I have to create a separate image for each screen resolution.. So, It's not suitable for me.
Is there a way to create my own shape qml type(TriangleShape, PolygonShape)?