From 29aa47177e231533e01141ddd9442f668f9aff0d Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Wed, 25 Sep 2019 18:12:16 +0200 Subject: [PATCH] Fixed dimmed colors in subpixel rendering mode. --- src/Window.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Window.cpp b/src/Window.cpp index f775a0a..fe080b8 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -229,29 +229,29 @@ void Window::setSubPixel(accum88 x, accum88 y, CRGB* color) { y = y >> 8; CRGB c; - c = CRGB(dim8_video( scale8( scale8( color->r, 255-py), 255-px)), - dim8_video( scale8( scale8( color->g, 255-py), 255-px)), - dim8_video( scale8( scale8( color->b, 255-py), 255-px))); + c = CRGB(scale8( scale8( color->r, 255-py), 255-px), + scale8( scale8( color->g, 255-py), 255-px), + scale8( scale8( color->b, 255-py), 255-px)); this->addPixelColor(x, y, &c); if (px) { - c = CRGB(dim8_video( scale8( scale8( color->r, 255-py), px)), - dim8_video( scale8( scale8( color->g, 255-py), px)), - dim8_video( scale8( scale8( color->b, 255-py), px))); + c = CRGB(scale8( scale8( color->r, 255-py), px), + scale8( scale8( color->g, 255-py), px), + scale8( scale8( color->b, 255-py), px)); this->addPixelColor(x+1, y, &c); } if (py) { - c = CRGB(dim8_video( scale8( scale8( color->r, py), 255-px)), - dim8_video( scale8( scale8( color->g, py), 255-px)), - dim8_video( scale8( scale8( color->b, py), 255-px))); + c = CRGB(scale8( scale8( color->r, py), 255-px), + scale8( scale8( color->g, py), 255-px), + scale8( scale8( color->b, py), 255-px)); this->addPixelColor(x, y+1, &c); } if (px || py) { - c = CRGB(dim8_video( scale8( scale8( color->r, py), px)), - dim8_video( scale8( scale8( color->g, py), px)), - dim8_video( scale8( scale8( color->b, py), px))); + c = CRGB(scale8( scale8( color->r, py), px), + scale8( scale8( color->g, py), px), + scale8( scale8( color->b, py), px)); this->addPixelColor(x+1, y+1, &c); } }