diff options
author | louis <louis.braun@gmx.de> | 2013-01-17 14:49:30 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-01-17 14:49:30 +0100 |
commit | c9bc7e07358b9ed9e7c16e48dcb0a6ea4f5d768e (patch) | |
tree | ab0326b8d11726e8641e084a9cc8f4a46eae2875 | |
parent | 68928cb9f07eb2461f25a5d082fea4f9bfc94d7f (diff) | |
download | vdr-plugin-tvguide-c9bc7e07358b9ed9e7c16e48dcb0a6ea4f5d768e.tar.gz vdr-plugin-tvguide-c9bc7e07358b9ed9e7c16e48dcb0a6ea4f5d768e.tar.bz2 |
Changed channelheader to display transparent logos properly
-rw-r--r-- | channelcolumn.c | 21 | ||||
-rw-r--r-- | channelcolumn.h | 1 |
2 files changed, 16 insertions, 6 deletions
diff --git a/channelcolumn.c b/channelcolumn.c index de5962b..5590ce3 100644 --- a/channelcolumn.c +++ b/channelcolumn.c @@ -8,6 +8,7 @@ cChannelColumn::cChannelColumn(int num, cChannel *channel, cMyTime *myTime) { } cChannelColumn::~cChannelColumn(void) { + osdManager.releasePixmap(pixmapLogo, cString::sprintf("channelcolumn logo %s", channel->Name())); grids.Clear(); } @@ -16,14 +17,21 @@ void cChannelColumn::clearGrids() { } void cChannelColumn::createHeader() { - color = theme.Color(clrHeader); - colorBlending = theme.Color(clrHeaderBlending); - caller = cString::sprintf("channelcolumn %s", channel->Name()); - pixmap = osdManager.requestPixmap(2, cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight), - cRect::Null, *caller); + color = theme.Color(clrHeader); + colorBlending = theme.Color(clrHeaderBlending); + caller = cString::sprintf("channelcolumn %s", channel->Name()); + pixmap = osdManager.requestPixmap(2, cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight), + cRect::Null, *caller); if (!pixmap) { return; } + pixmapLogo = osdManager.requestPixmap(3, cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight), + cRect::Null, *caller); + if (!pixmapLogo) { + return; + } + pixmapLogo->Fill(clrTransparent); + drawBackground(); cTextWrapper tw; cString headerText = cString::sprintf("%d - %s", channel->Number(), channel->Name()); @@ -37,7 +45,7 @@ void cChannelColumn::createHeader() { if (imgLoader.LoadLogo(channel->Name())) { cImage logo = imgLoader.GetImage(); int logoX = (tvguideConfig.colWidth - tvguideConfig.logoWidth)/2; - pixmap->DrawImage(cPoint(logoX, 5), logo); + pixmapLogo->DrawImage(cPoint(logoX, 5), logo); } yStart = tvguideConfig.logoHeight + 8; } @@ -53,6 +61,7 @@ void cChannelColumn::createHeader() { void cChannelColumn::drawHeader() { pixmap->SetViewPort(cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight)); + pixmapLogo->SetViewPort(cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight)); } bool cChannelColumn::readGrids() { diff --git a/channelcolumn.h b/channelcolumn.h index 28064d2..2b1fdbd 100644 --- a/channelcolumn.h +++ b/channelcolumn.h @@ -7,6 +7,7 @@ class cEpgGrid; class cChannelColumn : public cListObject, public cStyledPixmap { friend class cEpgGrid; private: + cPixmap *pixmapLogo; cMyTime *myTime; int num; cChannel *channel; |