summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-03-31 06:57:02 +0200
committerlouis <louis.braun@gmx.de>2015-03-31 06:57:02 +0200
commit3d43200af00372dd54abe2b86b00ca15a4fc6d82 (patch)
tree0acd63aa794fabae179d90c74e7ad38ad9d872c0 /views
parent1ba2ae905ad33f8e311100fd4e9e48653ca4b63d (diff)
downloadvdr-plugin-skindesigner-3d43200af00372dd54abe2b86b00ca15a4fc6d82.tar.gz
vdr-plugin-skindesigner-3d43200af00372dd54abe2b86b00ca15a4fc6d82.tar.bz2
added possibility to draw vertical text bottomum and topdown
Diffstat (limited to 'views')
-rw-r--r--views/view.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/views/view.c b/views/view.c
index a76c48a..344a350 100644
--- a/views/view.c
+++ b/views/view.c
@@ -513,10 +513,11 @@ void cView::DoDrawText(int num, cTemplateFunction *func, int x0, int y0) {
void cView::DoDrawTextVertical(int num, cTemplateFunction *func, int x0, int y0) {
string fontName = func->GetFontName();
int fontSize = func->GetNumericParameter(ptFontSize);
+ int direction = func->GetNumericParameter(ptDirection);
tColor clr = func->GetColorParameter(ptColor);
tColor clrBack = clrTransparent;
string text = func->GetText(false);
- cImage *textVertical = imgCache->GetVerticalText(text, clr, fontName, fontSize);
+ cImage *textVertical = imgCache->GetVerticalText(text, clr, fontName, fontSize, direction);
if (!textVertical)
return;
@@ -529,7 +530,7 @@ void cView::DoDrawTextVertical(int num, cTemplateFunction *func, int x0, int y0)
x = (containerWidth - textVertical->Width()) / 2;
} else if (align == alLeft) {
x = 0;
- } else if (align = alRight) {
+ } else if (align == alRight) {
int containerWidth = func->GetContainerWidth();
x = (containerWidth - textVertical->Width());
} else {
@@ -542,13 +543,12 @@ void cView::DoDrawTextVertical(int num, cTemplateFunction *func, int x0, int y0)
y = (containerHeight - textVertical->Height()) / 2;
} else if (align == alTop) {
y = 0;
- } else if (align = alBottom) {
+ } else if (align == alBottom) {
int containerHeight = func->GetContainerHeight();
y = (containerHeight - textVertical->Height());
} else {
y = func->GetNumericParameter(ptY);
}
-
if (x < 0) x = 0;
x += x0;
if (y < 0) y = func->GetContainerHeight() - textVertical->Height() - 5;