mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
fontrenderer: do not paint background color
do not paint the background color, making the font "transparent" this works around display problems in e.g. streaminfo, because the "wrong" background color is used git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@224 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -525,7 +525,10 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
|
|||||||
/* not nice (and also slower), but currently the easiest way to prevent visible errors */
|
/* not nice (and also slower), but currently the easiest way to prevent visible errors */
|
||||||
frameBuffer->paintPixel(x + glyph->left + ax, y - glyph->top + ay, colors[*s++]);
|
frameBuffer->paintPixel(x + glyph->left + ax, y - glyph->top + ay, colors[*s++]);
|
||||||
#else
|
#else
|
||||||
*td++= colors[*s++];
|
/* do not paint the backgroundcolor, see below */
|
||||||
|
if (colors[*s] != bgcolor)
|
||||||
|
*td = colors[*s];
|
||||||
|
td++; s++;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -549,7 +552,13 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
|
|||||||
#ifdef USE_NEVIS_GXA
|
#ifdef USE_NEVIS_GXA
|
||||||
frameBuffer->paintPixel(x + glyph->left + ax, y - glyph->top + ay, colors[lcolor]);
|
frameBuffer->paintPixel(x + glyph->left + ax, y - glyph->top + ay, colors[lcolor]);
|
||||||
#else
|
#else
|
||||||
*td++= colors[lcolor];
|
/* we make the font "transparent" by not painting the background color
|
||||||
|
colored boxes are painted beneath the fonts anyway
|
||||||
|
note that this is not totally correct, because of subpixel hinting etc,
|
||||||
|
but that should be barely visible in reality ;) */
|
||||||
|
if (colors[lcolor] != bgcolor)
|
||||||
|
*td = colors[lcolor];
|
||||||
|
td++;
|
||||||
#endif
|
#endif
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user