joey120373
Well-known member
First off, wonderfull library!
I have a teensy 3.2 and the Adafruit 2.8 Cap touch display, working great.
I have a couple of questions about displaying text on this screen,
1, Is there an elegant way of aligning or centering text on a fixed point, i.e. the top center of the screen.? Right now i am printing a float, in the top center of the screen, say its "99.99". As soon as i want to increase that to 100.00, i have to do all kinds if nasty looking code to reset the cursor location so that the text will stay centered. It would be awesome if i could get the text to just automatically center.
2, This also ties in with #1, Clearing text. I am sure anyone who has used this library quickly figures out that updating text on the screen without erasing the previous line of text leads to some alien looking text. I have used 2 solutions for this, one involves drawing a filled box the same color as the background, and sized appropriately to cover the "old" text, just before writing the "new" text.
The second is writing the "old" text using the same color font as the background, then changing the color back and printing the "new"text.
Now doing this is just ugly and complicated, especially when having to do both in tandem.
any sugestions?
Thanks, Joe
I have a teensy 3.2 and the Adafruit 2.8 Cap touch display, working great.
I have a couple of questions about displaying text on this screen,
1, Is there an elegant way of aligning or centering text on a fixed point, i.e. the top center of the screen.? Right now i am printing a float, in the top center of the screen, say its "99.99". As soon as i want to increase that to 100.00, i have to do all kinds if nasty looking code to reset the cursor location so that the text will stay centered. It would be awesome if i could get the text to just automatically center.
2, This also ties in with #1, Clearing text. I am sure anyone who has used this library quickly figures out that updating text on the screen without erasing the previous line of text leads to some alien looking text. I have used 2 solutions for this, one involves drawing a filled box the same color as the background, and sized appropriately to cover the "old" text, just before writing the "new" text.
The second is writing the "old" text using the same color font as the background, then changing the color back and printing the "new"text.
Now doing this is just ugly and complicated, especially when having to do both in tandem.
any sugestions?
Thanks, Joe