Don't draw transparent pixels

Signed-off-by: Thomas Rohloff <v10lator@myway.de>
This commit is contained in:
Thomas Rohloff 2023-10-03 11:23:58 +02:00 committed by Maschell
parent c38ef605cc
commit 184ca0bc5c

View File

@ -60,6 +60,10 @@ void DrawUtils::clear(Color col) {
} }
void DrawUtils::drawPixel(uint32_t x, uint32_t y, uint8_t r, uint8_t g, uint8_t b, uint8_t a) { void DrawUtils::drawPixel(uint32_t x, uint32_t y, uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
if (a == 0) {
return;
}
float opacity = a / 255.0f; float opacity = a / 255.0f;
// put pixel in the drc buffer // put pixel in the drc buffer