You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I only want to clear a small region like a clearRect(0,0,32,16); to prevent the flickering of display.clear();.
Or is there a way to set the color to black like display.setColor(RGB_COLOR8(0,0,0)); ?
My workaround: display.printFixed(x, y, " ");
Thanks again :-)
The text was updated successfully, but these errors were encountered:
I only want to clear a small region like a clearRect(0,0,32,16); to prevent the flickering of display.clear();.
Or is there a way to set the color to black like display.setColor(RGB_COLOR8(0,0,0)); ?
The way for you is to use fillRect() and setColor() methods.
display.setColor(RGB_COLOR8(0,0,0));
display.printFixed(x, y, s, STYLE_BOLD);
This however has an effect:
display.setColor(RGB_COLOR8(0,0,0));
display.invertColors();
display.printFixed(x, y, s, STYLE_BOLD);
That setColor(0) makes invertColors having no effect.
setColor(255) enables it again:
display.setColor(RGB_COLOR8(255,255,255));
display.invertColors();
display.printFixed(x, y, s, STYLE_BOLD);
So what confuses me is that this has no effect:
display.setColor(RGB_COLOR8(0,0,0));
display.printFixed(x, y, s, STYLE_BOLD);
So for printFixed, the setColor function is rather a setBackgroundColor.
Whereas for fillRect the setColor function is setting the paint color.
It is still nice because printing text will overwrite the area anyway (which i had not been aware of and therefore wanted a clearRect). So no need to set background and forground color but one call to invertColor will do it.
A bit confusing but i have no idea for you how to do it better :-)
Sorry for another simple question :-/
Have found nothing in your nice https://codedocs.xyz/lexus2k/lcdgfx/index.html
I only want to clear a small region like a
clearRect(0,0,32,16);
to prevent the flickering ofdisplay.clear();
.Or is there a way to set the color to black like
display.setColor(RGB_COLOR8(0,0,0));
?My workaround:
display.printFixed(x, y, " ");
Thanks again :-)
The text was updated successfully, but these errors were encountered: