From a0ab2cd35d91ba0080f9fb870d82aa90a51a0d6c Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 28 Nov 2012 18:40:32 +0000 Subject: nearly finished except latency --- vfg/src/Tag.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 vfg/src/Tag.h (limited to 'vfg/src/Tag.h') diff --git a/vfg/src/Tag.h b/vfg/src/Tag.h new file mode 100755 index 0000000..a75e442 --- /dev/null +++ b/vfg/src/Tag.h @@ -0,0 +1,34 @@ +#ifndef TAG_H +#define TAG_H + +#include "ofMain.h" + +//class for resolution independent ofImage billbaord & level tag animator + +class Billboard +{ + public: + Billboard(string name,float xPct=0.5f,float yPct=0.5f) { + img.loadImage(name); + anchorPoint=ofPoint(img.getWidth()*xPct,img.getHeight()*yPct); + } + void draw(float x, float y, float scale=1.0f); + protected: + ofImage img; + ofPoint anchorPoint; + private: + +}; + +class Tag: public Billboard { + public: + Tag(string name,int d,float xPct=0.5f,float yPct=0.5f): Billboard(name,xPct,yPct) {duration =d; }; + void draw(float x, float y, float scale=1.0f); + void play(); + bool isPlaying; + protected: + int startTime; + int duration; +}; + +#endif // TAG_H -- cgit v1.2.3