summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-08-17 15:31:18 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-08-17 15:31:18 +0200
commit48da9ba9c8f0d592f821c9a4afaca6eec7956981 (patch)
tree4a8622ce1f6d9367e853d2c102f521f20bfe1fe5
parent4d0297b804b47d1d14c1b97b146d6e071f41cd97 (diff)
downloadvdr-48da9ba9c8f0d592f821c9a4afaca6eec7956981.tar.gz
vdr-48da9ba9c8f0d592f821c9a4afaca6eec7956981.tar.bz2
Changed cBitmap::DrawText() to always draw the background unless ColorBg is clrTransparent
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--osd.c16
3 files changed, 11 insertions, 9 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 3512d802..e507cc3f 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1981,6 +1981,8 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
for suggestions that led to implementing cOsd::SetOsdPosition() etc.
for fixing a typo in the function name of cOsd::SetOsdPosition() and adding a range
check to it
+ for changing cBitmap::DrawText() to always draw the background unless ColorBg
+ is clrTransparent
Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present
diff --git a/HISTORY b/HISTORY
index 5cc45fca..cea6591e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5370,3 +5370,5 @@ Video Disk Recorder Revision History
- Optimized cNitFilter::Process() (thanks to Tobias Bratfisch).
- Reduced the number of time(NULL) calls in vdr.c's main loop to a single call
(thanks to Tobias Bratfisch).
+- Changed cBitmap::DrawText() to always draw the background unless ColorBg
+ is clrTransparent (thanks to Christoph Haubrich).
diff --git a/osd.c b/osd.c
index 013ef8b7..96dfc2e4 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.72 2007/08/12 11:33:17 kls Exp $
+ * $Id: osd.c 1.73 2007/08/17 15:23:50 kls Exp $
*/
#include "osd.h"
@@ -449,13 +449,13 @@ void cBitmap::DrawText(int x, int y, const char *s, tColor ColorFg, tColor Color
int w = Font->Width(s);
int h = Font->Height();
int limit = 0;
+ int cw = Width ? Width : w;
+ int ch = Height ? Height : h;
+ if (!Intersects(x, y, x + cw - 1, y + ch - 1))
+ return;
+ if (ColorBg != clrTransparent)
+ DrawRectangle(x, y, x + cw - 1, y + ch - 1, ColorBg);
if (Width || Height) {
- int cw = Width ? Width : w;
- int ch = Height ? Height : h;
- if (!Intersects(x, y, x + cw - 1, y + ch - 1))
- return;
- if (ColorBg != clrTransparent)
- DrawRectangle(x, y, x + cw - 1, y + ch - 1, ColorBg);
limit = x + cw - x0;
if (Width) {
if ((Alignment & taLeft) != 0)
@@ -482,8 +482,6 @@ void cBitmap::DrawText(int x, int y, const char *s, tColor ColorFg, tColor Color
}
}
}
- else if (!Intersects(x, y, x + w - 1, y + h - 1))
- return;
x -= x0;
y -= y0;
Font->DrawText(this, x, y, s, ColorFg, ColorBg, limit);