From e895a02d9703c2207d2424d6aaef373042fd0d54 Mon Sep 17 00:00:00 2001 From: louis Date: Thu, 17 Jan 2013 16:19:37 +0100 Subject: Added config option style nOpacity for backgrounds and theme nOpacity --- styledpixmap.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'styledpixmap.c') diff --git a/styledpixmap.c b/styledpixmap.c index 2569f53..1669501 100644 --- a/styledpixmap.c +++ b/styledpixmap.c @@ -22,11 +22,13 @@ void cStyledPixmap::setPixmap(cPixmap *pixmap) { } void cStyledPixmap::drawBackground() { - if (!tvguideConfig.useBlending) { - pixmap->Fill(color); - } else { + if (tvguideConfig.useBlending == 1){ drawBlendedBackground(); - } + } else if (tvguideConfig.useBlending == 2){ + drawSparsedBackground(); + } else { + pixmap->Fill(color); + } } void cStyledPixmap::drawBlendedBackground() { @@ -52,6 +54,15 @@ void cStyledPixmap::drawBlendedBackground() { } } +void cStyledPixmap::drawSparsedBackground() { + int width = pixmap->ViewPort().Width(); + int height = pixmap->ViewPort().Height(); + cImageLoader imgLoader; + if (imgLoader.DrawBackground(colorBlending, color, width, height)) + pixmap->DrawImage(cPoint(0,0), imgLoader.GetImage()); + +} + void cStyledPixmap::drawBorder() { int width = pixmap->ViewPort().Width(); int height = pixmap->ViewPort().Height(); -- cgit v1.2.3