diff options
Diffstat (limited to 'bitmap.h')
-rw-r--r-- | bitmap.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,5 +1,5 @@ /* - * $Id: bitmap.h,v 1.11 2004/06/16 18:46:50 lordjaxom Exp $ + * $Id: bitmap.h,v 1.12 2004/06/18 16:08:11 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_BITMAP_H @@ -9,13 +9,9 @@ #include "cache.h" #include <vdr/osd.h> -class cText2SkinBitmap; -typedef cText2SkinCache<string,cText2SkinBitmap*> cImageCache; - class cText2SkinBitmap { private: - static cImageCache mCache; - static bool mFirstTime; + static cText2SkinCache mCache; vector<cBitmap*> mBitmaps; int mCurrent; @@ -27,12 +23,14 @@ private: public: static cText2SkinBitmap *Load(const char *Filename, int Alpha = 0); + static void ResetCache(void) { mCache.Reset(); } static void FlushCache(void) { mCache.Flush(); } virtual ~cText2SkinBitmap(); + void Reset(void) { mCurrent = 0; mLastGet = 0; } cBitmap &Get(int &UpdateIn); - void SetColor(int Index, tColor Color) { mBitmaps[mCurrent]->SetColor(Index, Color); } + void SetColor(int Index, tColor Color); void SetAlpha(int Alpha); bool LoadXpm(const char *Filename, int Alpha); @@ -44,4 +42,8 @@ public: #endif }; +inline void cText2SkinBitmap::SetColor(int Index, tColor Color) { + mBitmaps[mCurrent]->SetColor(Index, Color); +} + #endif // VDR_TEXT2SKIN_BITMAP_H |