gargamel Posted November 14, 2015 Report Posted November 14, 2015 Hiwhat should i use to make a text move from one side of the screen to the other ? any suggestion please ? Thx
Joel Bodenmann Posted November 14, 2015 Report Posted November 14, 2015 Hello gargamel and welcome to the community!There is currently no "animation" support/module in the µGFX library. You will have to implement this yourself.Basically you just need to write text and then pixel-shift it. However, calling any of the gdispXxxStringXxx() string drawing functions each time in a loop will require a lot of CPU power. Therefore, we strongly recommend using PixMaps for this one.Pixmaps are actually intended for a use like that. As described in the documentation, a pixmap is nothing but a virtual display in your memory. Once you created a pixmap, you write the text to it (once). Then, all you need to do is rendering the same pixmap over and over again but just a different location.There is actually a complete, 1:1 example in the documentation as well as in the uGFX library directory showing how to do exactly that but with an image instead of text.Please do not hesitate to ask should you have any questions.~ Tectu
Joel Bodenmann Posted November 14, 2015 Report Posted November 14, 2015 One more thing: There are many display controllers out there who actually have a scrolling feature implemented in hardware. This would vastly increase performance as everything happens inside the display controller and not inside your CPU.We would recommend you checking whether you display controller supports such a feature.~ Tectu
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now