Fixed dimmed colors in subpixel rendering mode.
This commit is contained in:
parent
7ac681002e
commit
29aa47177e
@ -229,29 +229,29 @@ void Window::setSubPixel(accum88 x, accum88 y, CRGB* color) {
|
|||||||
y = y >> 8;
|
y = y >> 8;
|
||||||
|
|
||||||
CRGB c;
|
CRGB c;
|
||||||
c = CRGB(dim8_video( scale8( scale8( color->r, 255-py), 255-px)),
|
c = CRGB(scale8( scale8( color->r, 255-py), 255-px),
|
||||||
dim8_video( scale8( scale8( color->g, 255-py), 255-px)),
|
scale8( scale8( color->g, 255-py), 255-px),
|
||||||
dim8_video( scale8( scale8( color->b, 255-py), 255-px)));
|
scale8( scale8( color->b, 255-py), 255-px));
|
||||||
this->addPixelColor(x, y, &c);
|
this->addPixelColor(x, y, &c);
|
||||||
|
|
||||||
if (px) {
|
if (px) {
|
||||||
c = CRGB(dim8_video( scale8( scale8( color->r, 255-py), px)),
|
c = CRGB(scale8( scale8( color->r, 255-py), px),
|
||||||
dim8_video( scale8( scale8( color->g, 255-py), px)),
|
scale8( scale8( color->g, 255-py), px),
|
||||||
dim8_video( scale8( scale8( color->b, 255-py), px)));
|
scale8( scale8( color->b, 255-py), px));
|
||||||
this->addPixelColor(x+1, y, &c);
|
this->addPixelColor(x+1, y, &c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (py) {
|
if (py) {
|
||||||
c = CRGB(dim8_video( scale8( scale8( color->r, py), 255-px)),
|
c = CRGB(scale8( scale8( color->r, py), 255-px),
|
||||||
dim8_video( scale8( scale8( color->g, py), 255-px)),
|
scale8( scale8( color->g, py), 255-px),
|
||||||
dim8_video( scale8( scale8( color->b, py), 255-px)));
|
scale8( scale8( color->b, py), 255-px));
|
||||||
this->addPixelColor(x, y+1, &c);
|
this->addPixelColor(x, y+1, &c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (px || py) {
|
if (px || py) {
|
||||||
c = CRGB(dim8_video( scale8( scale8( color->r, py), px)),
|
c = CRGB(scale8( scale8( color->r, py), px),
|
||||||
dim8_video( scale8( scale8( color->g, py), px)),
|
scale8( scale8( color->g, py), px),
|
||||||
dim8_video( scale8( scale8( color->b, py), px)));
|
scale8( scale8( color->b, py), px));
|
||||||
this->addPixelColor(x+1, y+1, &c);
|
this->addPixelColor(x+1, y+1, &c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user