diff options
author | lordjaxom <lordjaxom> | 2004-06-18 16:41:02 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-06-18 16:41:02 +0000 |
commit | de602ae6486b181ec081749a510cfcf15c71c817 (patch) | |
tree | a6b7efe2b4ad29d6c88b588e8a9b0d7bbeff7c08 /render.c | |
parent | 1d3cd38e88ae97dd6906f9818d52b9ef07bf057d (diff) | |
download | vdr-plugin-text2skin-de602ae6486b181ec081749a510cfcf15c71c817.tar.gz vdr-plugin-text2skin-de602ae6486b181ec081749a510cfcf15c71c817.tar.bz2 |
- reimplemented image cache (fixes segfaults and speeds up image loading)v0.0.6
- fixed a recursion wenn de-initializing ImageMagick (crashes on exit)
- reverted the changes in ImageMagick-loader that concerned palettes
(obviously some versions of ImageMagick are BROKEN!!! I am using 5.5.7 which
works fine. Version 5.4.7 shows random errors)
- reimplemented "Flush image cache" into the setup menu
- included -lMagick into Makefile as a workaround for Debian (and others
possibly)
- fixed display of scrollbar
Diffstat (limited to 'render.c')
-rw-r--r-- | render.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ /* - * $Id: render.c,v 1.31 2004/06/16 18:46:50 lordjaxom Exp $ + * $Id: render.c,v 1.33 2004/06/18 16:41:08 lordjaxom Exp $ */ #include "render.h" @@ -99,7 +99,7 @@ cText2SkinRender::~cText2SkinRender() { } delete mScroller; delete mOsd; - cText2SkinBitmap::FlushCache(); + cText2SkinBitmap::ResetCache(); } void cText2SkinRender::Action(void) { @@ -247,6 +247,7 @@ void cText2SkinRender::DrawBackground(const POINT &Pos, const SIZE &Size, const if (Path != "") { char *p; asprintf(&p, "%s/%s/%s", SkinPath(), mData->Skin().c_str(), Path.c_str()); + Dprintf("Trying to load image: %s\n", p); if ((bmp = cText2SkinBitmap::Load(p, Alpha)) != NULL) { if (Bg) bmp->SetColor(0, *Bg); if (Fg) bmp->SetColor(1, *Fg); @@ -378,13 +379,13 @@ void cText2SkinRender::DrawScrollbar(const POINT &Pos, const SIZE &Size, int Off POINT sp = Pos; SIZE ss = Size; sp.y += Size.h * Offset / Total; - ss.h -= Size.h * (Shown - 2) / Total; + ss.h = Size.h * Shown / Total; DrawRectangle(sp, ss, Fg); } else { POINT sp = Pos; SIZE ss = Size; sp.x += Size.w * Offset / Total; - ss.w -= Size.w * (Shown - 2) / Total; + ss.w = Size.w * Shown / Total; DrawRectangle(sp, ss, Fg); } } |