Version 0.0.4

This commit is contained in:
louis
2013-05-24 16:23:23 +02:00
parent c611e00458
commit 9f47ab764e
25 changed files with 886 additions and 496 deletions

View File

@@ -13,7 +13,8 @@ cImageLoader::cImageLoader() {
cImageLoader::~cImageLoader() {
}
bool cImageLoader::LoadLogo(const char *logo, int width = tvguideConfig.logoWidth, int height = tvguideConfig.logoHeight) {
bool cImageLoader::LoadLogo(const char *logo, int width, int height) {
if ((width == 0)||(height==0))
return false;
std::string logoLower = logo;
@@ -26,9 +27,7 @@ bool cImageLoader::LoadLogo(const char *logo, int width = tvguideConfig.logoWidt
}
if (!LoadImage(logoLower.c_str(), tvguideConfig.logoPath, extension))
return false;
if (height != 0 || width != 0) {
buffer.sample( Geometry(width, height));
}
buffer.sample( Geometry(width, height));
return true;
}
@@ -46,7 +45,7 @@ bool cImageLoader::LoadEPGImage(int eventID) {
}
bool cImageLoader::DrawBackground(tColor back, tColor blend, int width, int height) {
if ((width == 0) || (height == 0))
if ((width < 1) || (height < 1))
return false;
Color Back = Argb2Color(back);
Color Blend = Argb2Color(blend);