From 92d5e5414ebd40ef6f3a5b2ec0f3054ac1719201 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Thu, 31 Dec 2020 13:18:40 +0100 Subject: [PATCH] Implement alpha by blending with current colors in sprite --- Extensions/Sprite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/Sprite.cpp b/Extensions/Sprite.cpp index 059f583..d5be5a3 100644 --- a/Extensions/Sprite.cpp +++ b/Extensions/Sprite.cpp @@ -2460,7 +2460,7 @@ void TFT_eSprite::drawGlyph(uint16_t code) if (pixel != 0xFF) { if (dl) { drawFastHLine( xs, y + cursor_y + gFont.maxAscent - gdY[gNum], dl, fg); dl = 0; } - if (getColor) bg = getColor(x + cursor_x + gdX[gNum], y + cursor_y + gFont.maxAscent - gdY[gNum]); + bg = readPixel(x + cursor_x + gdX[gNum], y + cursor_y + gFont.maxAscent - gdY[gNum]); if (_bpp != 1) drawPixel(x + cursor_x + gdX[gNum], y + cursor_y + gFont.maxAscent - gdY[gNum], alphaBlend(pixel, fg, bg)); else if (pixel>127) drawPixel(x + cursor_x + gdX[gNum], y + cursor_y + gFont.maxAscent - gdY[gNum], fg); }