summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--ttxtsubsdisplay.c11
2 files changed, 13 insertions, 0 deletions
diff --git a/HISTORY b/HISTORY
index 5f391bb..33105ea 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7,6 +7,8 @@ VDR Plugin 'ttxtsubs' Revision History
- Converted *.po to UTF-8
- Updated patch for VDR 1.7.20 (Closes #689)
- Don't log all page info received from VDR (Closes #331)
+- Show subtitles with backround rectangle, if outline width is < 2
+ (patch provided by Mike Lampard) (Closes #247)
2010-05-08: Version 0.2.2
- Fixed channel retune triggering in VDR patch and updated patch to 1.7.14
diff --git a/ttxtsubsdisplay.c b/ttxtsubsdisplay.c
index 7669823..9453a2f 100644
--- a/ttxtsubsdisplay.c
+++ b/ttxtsubsdisplay.c
@@ -423,6 +423,17 @@ void cTtxtSubsDisplay::ShowOSD(void)
_osd->DrawRectangle(0, 0, width - 1, height - 1, clrTransparent);
+ if(globals.mOutlineWidth < 2){
+ int maxwidth = 0;
+ for (int line = 0; line < _numberOfSubTitleTextLines; line++) {
+ int linewidth = _osdFont->Width(_subTitleTextLines[line].text);
+ if(linewidth > maxwidth)
+ maxwidth = linewidth;
+ }
+ maxwidth+=40;
+ _osd->DrawRectangle((width/2)-(maxwidth/2), 0, (width/2)+(maxwidth/2), height - 1, 0x8a000000);
+ }
+
for(int textLineIndex = 0; textLineIndex < _numberOfSubTitleTextLines; textLineIndex++)
{
int lineWidth = _osdFont->Width(_subTitleTextLines[textLineIndex].text) + 2 * globals.mOutlineWidth + 5;