2024-10-17 03:16 AM
Hi,
I want to show a circle progress like below:
In touchgfx's circleProgress, there is't the little circle at the progress line end;
So I am drawing the little circle and update its position realtime;
Is there any simpler way to do the same things?
And more, I need the sine() and the cosine() to calculate the position of the little circle, I find some info from HERE, but I don't know how to use it. Is there any example?
Thanks!
Solved! Go to Solution.
2024-10-17 07:19 AM
Hello @Junde,
Unfortunately, you have to manually move/animate the circle. You can use the provided Easing Equations for animating the movement of the circle.
Also, it would be easier to use the sin() or cos() functions that are available in math.h since the functions you mentioned are used for sophisticated drawings. But, if you really like to use them, you can see how they are used in the source code for Circle. You can access Circle.cpp from your installed TouchGFX directory\touchgfx\framework\source\touchgfx\widgets\canvas
I hope this helps you!
Don't hesitate to ask more questions if you have any!
2024-10-17 07:19 AM
Hello @Junde,
Unfortunately, you have to manually move/animate the circle. You can use the provided Easing Equations for animating the movement of the circle.
Also, it would be easier to use the sin() or cos() functions that are available in math.h since the functions you mentioned are used for sophisticated drawings. But, if you really like to use them, you can see how they are used in the source code for Circle. You can access Circle.cpp from your installed TouchGFX directory\touchgfx\framework\source\touchgfx\widgets\canvas
I hope this helps you!
Don't hesitate to ask more questions if you have any!
2024-10-17 06:52 PM
Thank you @Mohammad MORADI ESFAHANIASL
math.h is work well.
2024-10-18 02:59 AM
Glad to hear! :D
You're very welcome!
Best regards,