summaryrefslogtreecommitdiff
path: root/PLUGINS
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-02-26 12:13:59 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2011-02-26 12:13:59 +0100
commit0b8356aa927db1d536c00211a7d77fd2168d70dc (patch)
treea377947d3d0e110ba82e94990b8f92d07b022f4a /PLUGINS
parentd1ab9dbc5f0c35aa10ee0c67b9dc2eb6fd31dd13 (diff)
downloadvdr-0b8356aa927db1d536c00211a7d77fd2168d70dc.tar.gz
vdr-0b8356aa927db1d536c00211a7d77fd2168d70dc.tar.bz2
Improved and cleaned up transparent text drawing
Diffstat (limited to 'PLUGINS')
-rw-r--r--PLUGINS/src/osddemo/osddemo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/PLUGINS/src/osddemo/osddemo.c b/PLUGINS/src/osddemo/osddemo.c
index 87d94638..2e6a33bf 100644
--- a/PLUGINS/src/osddemo/osddemo.c
+++ b/PLUGINS/src/osddemo/osddemo.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: osddemo.c 2.2 2011/02/20 15:06:18 kls Exp $
+ * $Id: osddemo.c 2.3 2011/02/26 12:08:13 kls Exp $
*/
#include <vdr/osd.h>
@@ -338,7 +338,8 @@ void cTrueColorDemo::Action(void)
const int Size = Font->Width(Text) + 10;
const int NumDots = 12;
const int AnimFrames = NumDots;
- AnimPixmap = osd->CreatePixmap(3, cRect((osd->Width() - Size) / 2, StartLine, Size, Size), cRect(0, 0, Size, Size * AnimFrames));
+ // Temporarily using pixmap layer 0 to have the text alpha blended:
+ AnimPixmap = osd->CreatePixmap(0, cRect((osd->Width() - Size) / 2, StartLine, Size, Size), cRect(0, 0, Size, Size * AnimFrames));
if (AnimPixmap) {
AnimPixmap->SetAlpha(0);
AnimPixmap->Clear();
@@ -356,8 +357,9 @@ void cTrueColorDemo::Action(void)
AnimPixmap->DrawEllipse(cRect(x, y, Diameter, Diameter), ArgbToColor(0xFF, Color, Color, Color));
Color -= Delta;
}
- AnimPixmap->DrawText(cPoint(0, Frame * Size), "Animation", clrBlack, clrTransparent, cFont::GetFont(fontSml), Size, Size, taCenter);
+ AnimPixmap->DrawText(cPoint(0, Frame * Size), Text, clrBlack, clrTransparent, cFont::GetFont(fontSml), Size, Size, taCenter);
}
+ AnimPixmap->SetLayer(3); // now setting the actual pixmap layer
FadeInPixmap = AnimPixmap;
LOCK_THREAD;
OldCursor = cursor = AnimPixmap->ViewPort().Point();