diff options
| author | Comment <tim@gray.(none)> | 2012-11-28 18:40:32 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2012-11-28 18:40:32 +0000 |
| commit | a0ab2cd35d91ba0080f9fb870d82aa90a51a0d6c (patch) | |
| tree | 0e0fd44d0f07ccf1ea4a5f1e30a03e0203300321 /vfg/src/Tag.h | |
| parent | 75c277c10f206f5bf3799caa03a52f40c1c8b6cf (diff) | |
nearly finished except latency
Diffstat (limited to 'vfg/src/Tag.h')
| -rwxr-xr-x | vfg/src/Tag.h | 34 |
1 files changed, 34 insertions, 0 deletions
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
|
