Hi!
I want get color pixel when i click in QML. But i don’t know that the work fucntion.
Please help me!
Hi!
I want get color pixel when i click in QML. But i don’t know that the work fucntion.
Please help me!
tanthinh1510 (25th October 2014)
Hi wysota! thanks for your reply.
I have Rectangle with color animation, and then a put small circle in Rectangle. I want get color of pixel center circle when color animation changed.
I show you in the picture!
Untitled.png
Do you mean you want to fill the circle with the color corresponding to the color of the gradient underneath? Then either:
1. calculate the color manually (shouldn't be that hard)
2. implement a ShaderEffect to probe the texture of the gradient element and fill the circle with that color
3. put a ShaderEffectSource of the gradient element in the circle and stretch it so much that a single texel spans across the whole circle diameter (which might be hardest of the three approaches).
Bookmarks