bgfill on settextcolor not present when using a gradient background #2310
-
When using setTextColor, boolean bgfill can be used to overwrite text. However, when using a gradient background, only setTextColor with a single color can be used. There is no boolean for bgfill. I also tried text padding as per the examples, but this doesnt work for smooth fonts, i think? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Have a look at the ReadMe news item 7, that may address the problem. If not provide an example sketch that demonstrates the issue. |
Beta Was this translation helpful? Give feedback.
-
I realised that you might be expecting the library to redraw the gradient. The library does not have that capability so the sketch would have to clear the correct area. A better approach is to use a sprite and redraw the background and text in the sprite for each update and then push to the screen. |
Beta Was this translation helpful? Give feedback.
-
I was indeed thinking that, like the background, the library might be able to dynamically redraw the gradient. I'll give drawing to a sprite and then pushing it for each update a try! Thanks for the suggestion. |
Beta Was this translation helpful? Give feedback.
-
Okay i tried using a sprite and it works perfectly! Thanks for the suggestion. |
Beta Was this translation helpful? Give feedback.
I realised that you might be expecting the library to redraw the gradient. The library does not have that capability so the sketch would have to clear the correct area. A better approach is to use a sprite and redraw the background and text in the sprite for each update and then push to the screen.