diff options
author | Andreas Mair <amair.sob@googlemail.com> | 2007-06-11 12:57:02 +0200 |
---|---|---|
committer | Andreas Mair <amair.sob@googlemail.com> | 2007-06-11 12:57:02 +0200 |
commit | 24439e72e8b0d13bccce21e19a28d70d1bd98760 (patch) | |
tree | 40114ac9918d904e640900e3845f65243a2319ac /bitmap.c | |
parent | c562d549bc6274265991eec634f99b1e311323df (diff) | |
download | vdr-plugin-skinenigmang-24439e72e8b0d13bccce21e19a28d70d1bd98760.tar.gz vdr-plugin-skinenigmang-24439e72e8b0d13bccce21e19a28d70d1bd98760.tar.bz2 |
2007-06-11: Version 0.0.5rcv0.0.5rc
- Fixed possible crash in recording's details.
- Added MoBuntu theme (Submitted by Morone @vdr-portal.de).
- Added Blue, Blue2, Blue3 and Coolblue theme (Submitted by Uwe @vdr-portal.de).
- Added support for TrueTypeFonts (based on graphtft and text2skin plugins).
- Added support for new epgsearch tags.
- Updated French translation. (Submitted by pat @vdr-portal.de)
- Changed size calculation for scrollbars.
- Add setup options to individually set the fonts to use. See README for details.
- Set used colors for every area in menu OSD when using multiple areas.
- Reworked multiple areas mode in menu OSD.
- Do not disable logos/symbols/flags if 4bpp single area is configured in setup.
- Replaced setup options "One area (if possible)" and "Bpp in single area" by option "Try 8bpp single areas".
- Unified appearance of error/info/status messages in all OSDs.
- Added setup option to selectively enable scrolling text.
- Added setup option to selectively enable logos in the different OSDs.
- Added text effects (e.g. scrolling and blinking) for selected text.
- Removed clrMenuHighlight, clrMessageBorder, clrMenuItemCurrentFg, clrMenuEventTitle, clrMenuEventShortText, clrMenuScrollbarTotal and clrMenuScrollbarShown in themes.
- Fixed height of title/subtitle box in EPG & recording details.
- Recognize mediamanager plugin in mainmenu logos.
- Don't cut info line in EPG & recording details at logo area's left edge.
- Updated Russian translation (Submitted by neptunvasja @vdr-portal.de).
- Added Dutch translation (Submitted by dorpsgek @vdr-portal.de).
- Various bugfixes and graphical changes.
Diffstat (limited to 'bitmap.c')
-rw-r--r-- | bitmap.c | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -1,15 +1,20 @@ #ifdef HAVE_IMAGEMAGICK + +#include "common.h" #include "bitmap.h" #include "config.h" -#include <vdr/themes.h> - +#ifndef X_DISPLAY_MISSING #define X_DISPLAY_MISSING +#endif + +#undef debug #include <Magick++.h> using namespace Magick; #include <vector> -using namespace std; + +#include <vdr/themes.h> cOSDImageBitmap::cOSDImageBitmap() {} @@ -18,12 +23,12 @@ cOSDImageBitmap::cOSDImageBitmap() cOSDImageBitmap::~cOSDImageBitmap() {} -bool cOSDImageBitmap::LoadImage(const char *fileNameP, int w, int h, int colors, cBitmap &bmp) +bool cOSDImageBitmap::DrawImage(const char *fileNameP, int x, int y, int w, int h, int colors, cBitmap *bmp) { - return LoadMagick(fileNameP, w, h, colors, bmp); + return DrawMagick(fileNameP, x, y, w, h, colors, bmp); } -bool cOSDImageBitmap::LoadMagick(const char *Filename, int width, int height, int colors, cBitmap &bmp) +bool cOSDImageBitmap::DrawMagick(const char *Filename, int x, int y, int width, int height, int colors, cBitmap *bmp) { Image image; try { @@ -52,8 +57,10 @@ bool cOSDImageBitmap::LoadMagick(const char *Filename, int width, int height, in image.quantizeColors(colors); image.quantize(); } - bmp.SetSize(w, h); - bmp.SetBpp(colors <= 16 ? 4 : 8); + + // center image + x += ((width - w) / 2); + y += ((height - h) / 2); const PixelPacket *pix = image.getConstPixels(0, 0, w, h); for (int iy = 0; iy < h; ++iy) { @@ -62,7 +69,7 @@ bool cOSDImageBitmap::LoadMagick(const char *Filename, int width, int height, in | ((pix->red * 255 / MaxRGB) << 16) | ((pix->green * 255 / MaxRGB) << 8) | (pix->blue * 255 / MaxRGB); - bmp.DrawPixel(ix, iy, col); + bmp->DrawPixel(x + ix, y + iy, col); ++pix; } } |