diff options
author | louis <louis.braun@gmx.de> | 2013-07-09 00:17:42 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-07-09 00:17:42 +0200 |
commit | 2a7a011055a44516ec981e525776394a8c04dcfe (patch) | |
tree | 55c9828c7b619622ec36da3f4b41318ed6c85ae0 /imageloader.c | |
parent | 6da4b610d98cafe7c20555c926359d7f89347c76 (diff) | |
download | vdr-plugin-tvguide-2a7a011055a44516ec981e525776394a8c04dcfe.tar.gz vdr-plugin-tvguide-2a7a011055a44516ec981e525776394a8c04dcfe.tar.bz2 |
Version 0.0.6
Diffstat (limited to 'imageloader.c')
-rw-r--r-- | imageloader.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/imageloader.c b/imageloader.c index 31e0d0c..292d183 100644 --- a/imageloader.c +++ b/imageloader.c @@ -59,8 +59,19 @@ bool cImageLoader::LoadAdditionalEPGImage(cString name) { return true; } +bool cImageLoader::LoadIcon(const char *cIcon, int size) { + if (size==0) + return false; + bool success = false; + success = LoadImage(cString(cIcon), tvguideConfig.iconPath, "png"); + if (!success) + return false; + buffer.sample(Geometry(size, size)); + return true; +} + bool cImageLoader::DrawBackground(tColor back, tColor blend, int width, int height) { - if ((width < 1) || (height < 1)) + if ((width < 1) || (height < 1) || (width > 1920) || (height > 1080)) return false; Color Back = Argb2Color(back); Color Blend = Argb2Color(blend); |