forked from Bodmer/TFT_eSPI
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user