diff options
author | louis <louis.braun@gmx.de> | 2013-03-23 17:14:09 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-03-23 17:14:09 +0100 |
commit | aac2874538b46a9fc7e5540643b1d527241b3fac (patch) | |
tree | c0e5b6302ee739094d291ffdbd5ac015c6c0d0c8 /textwindow.c | |
parent | 7f3175adc1eb023e8f79b31f6e552fdba8ad02bc (diff) | |
download | skin-nopacity-aac2874538b46a9fc7e5540643b1d527241b3fac.tar.gz skin-nopacity-aac2874538b46a9fc7e5540643b1d527241b3fac.tar.bz2 |
added background pixmaps for main menu timers and epg info window to avoid nasty font pixelation effect
Diffstat (limited to 'textwindow.c')
-rw-r--r-- | textwindow.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/textwindow.c b/textwindow.c index 72f3c1b..26e4134 100644 --- a/textwindow.c +++ b/textwindow.c @@ -3,6 +3,7 @@ cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font) { this->osd = osd; this->font = font; + pixmapBackground = NULL; pixmap = NULL; } @@ -10,6 +11,10 @@ cNopacityTextWindow::~cNopacityTextWindow(void) { Cancel(-1); while (Active()) cCondWait::SleepMs(10); + if (pixmapBackground) { + osd->DestroyPixmap(pixmapBackground); + pixmapBackground = NULL; + } if (pixmap) { osd->DestroyPixmap(pixmap); pixmap = NULL; @@ -27,8 +32,11 @@ bool cNopacityTextWindow::CreatePixmap(int border) { scrolling = true; } cPixmap::Lock(); - pixmap = osd->CreatePixmap(4, cRect(geometry->X(), geometry->Y(), geometry->Width(), geometry->Height()), + pixmapBackground = osd->CreatePixmap(4, cRect(geometry->X(), geometry->Y(), geometry->Width(), geometry->Height())); + pixmap = osd->CreatePixmap(5, cRect(geometry->X(), geometry->Y(), geometry->Width(), geometry->Height()), cRect(0, 0, geometry->Width(), drawportHeight)); + pixmapBackground->SetAlpha(0); + pixmapBackground->Fill(clrBlack); pixmap->SetAlpha(0); pixmap->Fill(Theme.Color(clrMenuBorder)); pixmap->DrawRectangle(cRect(1, 1, geometry->Width()-2, drawportHeight-2), Theme.Color(clrMenuBack)); @@ -74,6 +82,7 @@ void cNopacityTextWindow::Action(void) { cPixmap::Lock(); double t = min(double(Now - Start) / FadeTime, 1.0); int Alpha = t * ALPHA_OPAQUE; + pixmapBackground->SetAlpha(Alpha); pixmap->SetAlpha(Alpha); if (Running()) osd->Flush(); |