1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
|