summaryrefslogtreecommitdiff
path: root/render.h
diff options
context:
space:
mode:
authorChristian Tusche <chr13@gmx.net>2007-07-29 19:01:17 +0200
committerThomas Günther <tom@toms-cafe.de>2009-06-04 01:30:20 +0200
commit3ab2393b6932b34e7f0e69af7f843d1303104d79 (patch)
treec1a4f7e6e61f6a09bad4420614be52420506a362 /render.h
parentf6f140b2ea0bb1de9e055e920ef9c0c43c6e2add (diff)
downloadvdr-plugin-text2skin-chr13-optimizations.tar.gz
vdr-plugin-text2skin-chr13-optimizations.tar.bz2
2007-07-29: Version 1.1-cvs_ext-0.11 (text2skin-1.1-cvs_ext-0.11.diff)chr13-optimizations
- moved state tracking of marquee, blink, scroll from cText2SkinRender to cxObject - fixed compatibility with gcc-4 and vdr-1.5.x - fixed use of Update.Lock() in render.h - new: dynamic width/height of objects - new: Option "bgColor" used for items "Text", "Marquee", and "Blink". - remember period to next timeout when doing a non-timeout refresh prevent occasional start/stop of marquee-text
Diffstat (limited to 'render.h')
-rw-r--r--render.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/render.h b/render.h
index 241e908..f788168 100644
--- a/render.h
+++ b/render.h
@@ -65,19 +65,6 @@ private:
// coordinate transformation
txSize mBaseSize;
-
- // state information for marquee, blink, scroll
- struct tState {
- bool scrolling;
- int offset;
- int direction;
- uint nexttime;
- std::string text;
-
- tState(void): scrolling(false), offset(0), direction(1), nexttime(0) {}
- };
- typedef std::map<uint,tState> tStates;
- tStates mStates;
// scalefactor for tabs in the menu list
float mTabScale;
@@ -91,7 +78,7 @@ protected:
// Drawing operations
void DrawObject(cxObject *Object, const txPoint &BaseOffset=txPoint(-1,-1),
- const txSize &BaseSize=txSize(-1,-1),
+ const txSize &BaseSize=txSize(-1,-1), const txSize &VirtSize=txSize(-1,-1),
int ListItem=-1, bool ForceUpdate=false);
void DrawItemText(cxObject *o, int i, const txPoint &ListOffset, const txSize &ListSize);
@@ -99,12 +86,13 @@ protected:
int Alpha, const std::string &Path);
void DrawImage(const txPoint &Pos, const txSize &Size, const tColor *Bg, const tColor *Fg,
const tColor *Mask, int Alpha, int Colors, const std::string &Path);
- void DrawText(const txPoint &Pos, const txSize &Size, const tColor *Fg, const std::string &Text,
- const cFont *Font, int Align);
- void DrawMarquee(const txPoint &Pos, const txSize &Size, const tColor *Fg,
- const std::string &Text, const cFont *Font, int Align, uint Delay, uint Index);
+ void DrawText(const txPoint &Pos, const txSize &Size, const tColor *Fg, const tColor *Bg,
+ const std::string &Text, const cFont *Font, int Align);
+ void DrawMarquee(const txPoint &Pos, const txSize &Size, const tColor *Fg, const tColor *Bg,
+ const std::string &Text, const cFont *Font, int Align, uint Delay, txState &state);
void DrawBlink(const txPoint &Pos, const txSize &Size, const tColor *Fg, const tColor *Bg,
- const std::string &Text, const cFont *Font, int Align, uint Delay, uint Index);
+ const tColor *Bl, const std::string &Text, const cFont *Font, int Align,
+ uint Delay, txState &state);
void DrawRectangle(const txPoint &Pos, const txSize &Size, const tColor *Fg);
void DrawEllipse(const txPoint &Pos, const txSize &Size, const tColor *Fg, int Arc);
void DrawSlope(const txPoint &Pos, const txSize &Size, const tColor *Fg, int Arc);
@@ -188,9 +176,8 @@ inline void cText2SkinRender::Flush(bool Force)
}
if (mDirty>0) {
- mTokenCache.clear();
-
UpdateLock();
+ mTokenCache.clear();
mDoUpdate.Broadcast();
UpdateUnlock();
}