Unverified Commit 22901f5d authored by Bodmer's avatar Bodmer Committed by GitHub

Fix #1802

setTextColor has a new parameter for smooth fonts to force background fill.
parent 79b41bc8
......@@ -86,7 +86,7 @@ void setup() {
spr.createSprite(spr_width, spr.fontHeight());
uint16_t bg_color = tft.readPixel(120, 120); // Get colour from dial centre
spr.fillSprite(bg_color);
spr.setTextColor(TFT_WHITE, bg_color);
spr.setTextColor(TFT_WHITE, bg_color, true);
spr.setTextDatum(MC_DATUM);
spr.setTextPadding(spr_width);
spr.drawNumber(0, spr_width/2, spr.fontHeight()/2);
......@@ -203,6 +203,7 @@ void plotNeedle(int16_t angle, uint16_t ms_delay)
}
// Update the number at the centre of the dial
spr.setTextColor(TFT_WHITE, bg_color, true);
spr.drawNumber(old_angle+120, spr_width/2, spr.fontHeight()/2);
spr.pushSprite(120 - spr_width / 2, 120 - spr.fontHeight() / 2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment