summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-05-17 16:38:50 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-05-17 16:38:50 +0200
commitc1ddc63fda4b2896eee72bacc1f935b1194b3800 (patch)
tree9fb699d56895fba3474386e289f4ed3c455b503c /osd.c
parent4f889749b3d4a6f3e0c24cc03bd4e432c6638cdf (diff)
downloadvdr-c1ddc63fda4b2896eee72bacc1f935b1194b3800.tar.gz
vdr-c1ddc63fda4b2896eee72bacc1f935b1194b3800.tar.bz2
Implemented taBorder alignment flag
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/osd.c b/osd.c
index fc4ffa42..84c5a278 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 2.28 2012/03/28 10:40:12 kls Exp $
+ * $Id: osd.c 2.29 2012/05/17 13:29:19 kls Exp $
*/
#include "osd.h"
@@ -553,11 +553,15 @@ void cBitmap::DrawText(int x, int y, const char *s, tColor ColorFg, tColor Color
if (Width || Height) {
limit = x + cw - x0;
if (Width) {
- if ((Alignment & taLeft) != 0)
- ;
+ if ((Alignment & taLeft) != 0) {
+ if ((Alignment & taBorder) != 0)
+ x += max(h / TEXT_ALIGN_BORDER, 1);
+ }
else if ((Alignment & taRight) != 0) {
if (w < Width)
x += Width - w;
+ if ((Alignment & taBorder) != 0)
+ x -= max(h / TEXT_ALIGN_BORDER, 1);
}
else { // taCentered
if (w < Width)
@@ -1280,11 +1284,15 @@ void cPixmapMemory::DrawText(const cPoint &Point, const char *s, tColor ColorFg,
if (Width || Height) {
limit = x + cw;
if (Width) {
- if ((Alignment & taLeft) != 0)
- ;
+ if ((Alignment & taLeft) != 0) {
+ if ((Alignment & taBorder) != 0)
+ x += max(h / TEXT_ALIGN_BORDER, 1);
+ }
else if ((Alignment & taRight) != 0) {
if (w < Width)
x += Width - w;
+ if ((Alignment & taBorder) != 0)
+ x -= max(h / TEXT_ALIGN_BORDER, 1);
}
else { // taCentered
if (w < Width)