diff options
Diffstat (limited to 'liveengine/src')
| -rw-r--r-- | liveengine/src/main.cpp | 2 | ||||
| -rwxr-xr-x | liveengine/src/testApp.cpp | 17 | ||||
| -rwxr-xr-x | liveengine/src/testApp.h | 8 |
3 files changed, 24 insertions, 3 deletions
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<svg.getNumPath();i++) {
+ printf("path %i: fill %08x stroke %08x\n",i,svg.getPathAt(i).getFillColor().getHex(),svg.getPathAt(i).getStrokeColor().getHex());
+ }
} //-------------------------------------------------------------- @@ -82,7 +90,7 @@ void testApp::draw(){ grab.update();
grab.reloadTexture(); ofBackground(0,0,0); - grab.draw( 1,1); + //grab.draw( 1,1); float notewidth=ofGetWidth()/NUM_NOTES; float noteheight=ofGetHeight()/NUM_CONTROLLERS; @@ -91,6 +99,11 @@ void testApp::draw(){ ofSetColor(ofColor((controller_colours[i].r*controllers[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;i<numLayers;i++) layers[i]->draw();
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; }; |
