From d4398c0f9f417ef527d05e3e394d9f5e329b537e Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 27 Aug 2012 16:13:41 +0100 Subject: loading svg --- liveengine/src/main.cpp | 2 +- liveengine/src/testApp.cpp | 17 +++++++++++++++-- liveengine/src/testApp.h | 8 ++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) (limited to 'liveengine/src') diff --git a/liveengine/src/main.cpp b/liveengine/src/main.cpp index f5eaddd..41470a2 100644 --- a/liveengine/src/main.cpp +++ b/liveengine/src/main.cpp @@ -6,7 +6,7 @@ int main( ){ ofAppGlutWindow window; - ofSetupOpenGL(&window, 400,300, OF_WINDOW); // <-------- setup the GL context + ofSetupOpenGL(&window, 1024,768, OF_WINDOW); // <-------- setup the GL context //ofSetupOpenGL(&window, 1024,768, OF_WINDOW); // this kicks off the running of my app diff --git a/liveengine/src/testApp.cpp b/liveengine/src/testApp.cpp index 5c337b0..62d18b2 100755 --- a/liveengine/src/testApp.cpp +++ b/liveengine/src/testApp.cpp @@ -67,7 +67,15 @@ void testApp::setup(){ grab.setUseTexture(true); showFPS=false; - ofBackground(0,0,0); + ofBackground(0,0,0); + + //drawing.load("test.svg"); + //drawing.fill("0xffffff"); + svg.load("Ag01036x.wmf.svg"); + printf("loaded Ag01036x.wmf.svg: %i paths\n",svg.getNumPath()); + for (int i=0;i>7,(controller_colours[i].g*controllers[i])>>7,(controller_colours[i].b*controllers[i])>>7)); ofRect(note*notewidth,i*noteheight,notewidth,noteheight); } + + ofPushMatrix(); + ofScale(sin(ofGetElapsedTimef())+1.1,sin(ofGetElapsedTimef())+1.1); + svg.draw(); + ofPopMatrix(); //for (int i=0;idraw(); ofSetColor(255,255,255); diff --git a/liveengine/src/testApp.h b/liveengine/src/testApp.h index e4bb2bc..fbe8537 100755 --- a/liveengine/src/testApp.h +++ b/liveengine/src/testApp.h @@ -36,7 +36,10 @@ nice to think about making scripted layers - using nseel or other initially - divide screen into grid - play notes with fade +class that loads an svg and maps controllers to layers +layers are there but maybe its best to draw all of the colours mapped in some way rather than cutting out layers - colour transformation based on a hue angle +can draw */ @@ -51,6 +54,8 @@ initially - divide screen into grid - play notes with fade #include "ofxMidi.h" +#include "ofxSVG.h" +#include "ofxSVGTiny.h" class testApp : public ofBaseApp, public ofxMidiListener{ @@ -86,5 +91,8 @@ class testApp : public ofBaseApp, public ofxMidiListener{ ofxMidiIn midiIn; void newMidiMessage(ofxMidiEventArgs& eventArgs); + + //ofxSVG drawing; + ofxSVGTiny svg; }; -- cgit v1.2.3