summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-06-05 11:42:08 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-06-05 11:42:08 +0200
commit00645daa93f8b26de7b6a71ea425ef406bdf55d6 (patch)
treeb81b506325bf21e5eb42b41c62d74a54b3457f9b /osd.c
parent2a5a55cee77c35c437e9f92cbc012e4ffe223dd3 (diff)
downloadvdr-00645daa93f8b26de7b6a71ea425ef406bdf55d6.tar.gz
vdr-00645daa93f8b26de7b6a71ea425ef406bdf55d6.tar.bz2
Implemented drawing "transparent" texts
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/osd.c b/osd.c
index 7feee784..b61bfbd9 100644
--- a/osd.c
+++ b/osd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.c 1.49 2004/06/05 11:15:43 kls Exp $
+ * $Id: osd.c 1.50 2004/06/05 11:37:42 kls Exp $
*/
#include "osd.h"
@@ -355,7 +355,8 @@ void cBitmap::DrawText(int x, int y, const char *s, tColor ColorFg, tColor Color
int ch = Height ? Height : h;
if (!Intersects(x, y, x + cw - 1, y + ch - 1))
return;
- DrawRectangle(x, y, x + cw - 1, y + ch - 1, ColorBg);
+ if (ColorBg != clrTransparent)
+ DrawRectangle(x, y, x + cw - 1, y + ch - 1, ColorBg);
limit = x + cw - x0;
if (Width) {
if ((Alignment & taLeft) != 0)
@@ -396,7 +397,8 @@ void cBitmap::DrawText(int x, int y, const char *s, tColor ColorFg, tColor Color
for (int row = 0; row < h; row++) {
cFont::tPixelData PixelData = CharData->lines[row];
for (int col = CharData->width; col-- > 0; ) {
- SetIndex(x + col, y + row, (PixelData & 1) ? fg : bg);
+ if (ColorBg != clrTransparent || (PixelData & 1))
+ SetIndex(x + col, y + row, (PixelData & 1) ? fg : bg);
PixelData >>= 1;
}
}