Experimental option for non-transparent fonts, to make them readable with high transparency levels. Looking a bit ugly, must be improved

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1858 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 0b32b39bdf
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-11-17 (Thu, 17 Nov 2011)
This commit is contained in:
[CST] Focus
2011-11-17 10:53:53 +00:00
parent da9d2959a6
commit 12336ef92e
7 changed files with 43 additions and 30 deletions

View File

@@ -35,6 +35,7 @@
#include <driver/fontrenderer.h>
#include <system/debug.h>
#include <global.h>
/* Drawing pixels is actually faster without the GXA accelerator (wich OTOH is
faster for drawing lines, so disable it here. */
@@ -451,6 +452,9 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
(((fgg + deltag * i / 255) & ((1 << gl) - 1)) << go) |
(((fgb + deltab * i / 255) & ((1 << bl) - 1)) << bo) |
(((fgt + deltat * i / 255) & ((1 << tl) - 1)) << to));
/* FIXME must be better solution */
if(g_settings.contrast_fonts && ((255-i) > 128))
colors[255 - i] |= 0xFF << to;
}
}
@@ -540,7 +544,9 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
frameBuffer->paintPixel(x + glyph->left + ax, y - glyph->top + ay, colors[*s++]);
#else
/* do not paint the backgroundcolor, see below */
if (colors[*s] != bgcolor)
//if (colors[*s] != bgcolor)
// from code above bgcolor index should be always 0
if(*s != 0)
*td = colors[*s];
td++; s++;
#endif
@@ -570,7 +576,9 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
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)
//if (colors[lcolor] != bgcolor)
// from code above bgcolor index should be always 0
if (lcolor != 0)
*td = colors[lcolor];
td++;
#endif