Add new callback for smooth font antialiasing

Callback allows anitaliased fonts to be rendered over colour gradients
or images.
"Smooth_font_reading_TFT" example added
"Smooth_font_gradient" example added
Minor changes to avoid signed/unsigned comparison warnings.
This commit is contained in:
Bodmer
2019-11-10 02:23:22 +00:00
parent d28e43574b
commit 5bb14ba2d8
16 changed files with 369 additions and 46 deletions
+1 -1
View File
@@ -370,7 +370,6 @@ uint16_t TFT_eSPI::decodeUTF8(uint8_t c)
*/
/***************************************************************************************
** Function name: alphaBlend
** Description: Blend foreground and background and return new colour
@@ -509,6 +508,7 @@ void TFT_eSPI::drawGlyph(uint16_t code)
else drawFastHLine( xs, y + cy, dl, fg);
dl = 0;
}
if (getColor) bg = getColor(x + cx, y + cy);
drawPixel(x + cx, y + cy, alphaBlend(pixel, fg, bg));
}
else