summaryrefslogtreecommitdiff
path: root/liveengineUnmapped/src/layers.h
diff options
context:
space:
mode:
Diffstat (limited to 'liveengineUnmapped/src/layers.h')
-rwxr-xr-xliveengineUnmapped/src/layers.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/liveengineUnmapped/src/layers.h b/liveengineUnmapped/src/layers.h
new file mode 100755
index 0000000..c6f4171
--- /dev/null
+++ b/liveengineUnmapped/src/layers.h
@@ -0,0 +1,54 @@
+#ifndef SVGLAYER_H
+#define SVGLAYER_H
+
+#include "ofxSVGTiny.h"
+#include "ofMain.h"
+
+class layer
+{
+ public:
+ layer(){};
+ layer(string _f) {load(_f);};
+ virtual ~layer(){};
+ virtual void load(string _f){};
+ virtual void draw(float a,int cx,int cy,float colShift){};
+ virtual void draw(float a,unsigned char* controllers,int cx,int cy,bool transparentBlack=false,float colShift=0.0f){ draw(a,cx,cy,colShift);};
+ bool getLoaded() {return isLoaded;};
+ protected:
+ bool isLoaded;
+ private:
+
+};
+
+class svglayer: public layer
+{
+ public:
+ svglayer();
+ svglayer(string _f);
+ virtual ~svglayer();
+ void load(string _f);
+ void draw(float a,int cx,int cy,float colShift);
+ void draw(float a,unsigned char* controllers,int cx,int cy,bool transparentBlack=false,float colShift=0.0f);
+ void getCentre(int cx,int cy);
+ protected:
+ private:
+ ofxSVGTiny svg;
+ vector <ofColor> fills;
+ vector <ofColor> strokes;
+ float xo,yo;
+};
+
+class imglayer: public layer
+{
+ public:
+ imglayer();
+ imglayer(string _f);
+ virtual ~imglayer();
+ void load(string _f);
+ void draw(float a,int cx,int cy,float colShift);
+ void draw(float a,unsigned char* controllers,int cx,int cy,bool transparentBlack,float colShift);
+ protected:
+ private:
+ ofImage img;
+};
+#endif // SVGLAYER_H