summaryrefslogtreecommitdiff
path: root/liveengineUnmapped/ofxSVGTiny/src/ofxSVGTiny.h
diff options
context:
space:
mode:
Diffstat (limited to 'liveengineUnmapped/ofxSVGTiny/src/ofxSVGTiny.h')
-rw-r--r--liveengineUnmapped/ofxSVGTiny/src/ofxSVGTiny.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/liveengineUnmapped/ofxSVGTiny/src/ofxSVGTiny.h b/liveengineUnmapped/ofxSVGTiny/src/ofxSVGTiny.h
new file mode 100644
index 0000000..5c9a2d3
--- /dev/null
+++ b/liveengineUnmapped/ofxSVGTiny/src/ofxSVGTiny.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include "ofMain.h"
+
+extern "C"
+{
+#include "svgtiny.h"
+};
+
+class ofxSVGTiny
+{
+public:
+
+ ~ofxSVGTiny();
+
+ void load(string path);
+ void draw();
+
+ float getWidth() const { return width; }
+ float getHeight() const { return height; }
+ int getNumPath() { return paths.size(); }
+ ofPath& getPathAt(int n) { return *paths[n]; }
+
+private:
+ float width, height;
+
+ typedef ofPtr<ofPath> ofPathRef;
+ vector<ofPathRef> paths;
+
+ void setupDiagram(struct svgtiny_diagram *diagram);
+ void setupShape(struct svgtiny_shape *shape);
+
+}; \ No newline at end of file