summaryrefslogtreecommitdiff
path: root/osdmanager.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-07-09 00:17:42 +0200
committerlouis <louis.braun@gmx.de>2013-07-09 00:17:42 +0200
commit2a7a011055a44516ec981e525776394a8c04dcfe (patch)
tree55c9828c7b619622ec36da3f4b41318ed6c85ae0 /osdmanager.c
parent6da4b610d98cafe7c20555c926359d7f89347c76 (diff)
downloadvdr-plugin-tvguide-2a7a011055a44516ec981e525776394a8c04dcfe.tar.gz
vdr-plugin-tvguide-2a7a011055a44516ec981e525776394a8c04dcfe.tar.bz2
Version 0.0.6
Diffstat (limited to 'osdmanager.c')
-rw-r--r--osdmanager.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/osdmanager.c b/osdmanager.c
index 8fdd7f6..c74162d 100644
--- a/osdmanager.c
+++ b/osdmanager.c
@@ -1,6 +1,3 @@
-#include <string>
-#include <sstream>
-
#ifndef __TVGUIDE_OSDMANAGER_H
#define __TVGUIDE_OSDMANAGER_H
@@ -55,32 +52,4 @@ void cOsdManager::releasePixmap(cPixmap *pixmap) {
if (!pixmap)
return;
osd->DestroyPixmap(pixmap);
-}
-
-static std::string CutText(std::string text, int width, const cFont *font) {
- if (width <= font->Size())
- return text.c_str();
- if (font->Width(text.c_str()) < width)
- return text.c_str();
- cTextWrapper twText;
- twText.Set(text.c_str(), font, width);
- std::string cuttedTextNative = twText.GetLine(0);
- std::stringstream sstrText;
- sstrText << cuttedTextNative << "...";
- std::string cuttedText = sstrText.str();
- int actWidth = font->Width(cuttedText.c_str());
- if (actWidth > width) {
- int overlap = actWidth - width;
- int charWidth = font->Width(".");
- if (charWidth == 0)
- charWidth = 1;
- int cutChars = overlap / charWidth;
- if (cutChars > 0) {
- cuttedTextNative = cuttedTextNative.substr(0, cuttedTextNative.length() - cutChars);
- std::stringstream sstrText2;
- sstrText2 << cuttedTextNative << "...";
- cuttedText = sstrText2.str();
- }
- }
- return cuttedText;
} \ No newline at end of file