summaryrefslogtreecommitdiff
path: root/nextus/src/ofApp.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@getdrop.com>2023-04-23 23:22:38 +0100
committerTim Redfern <tim@getdrop.com>2023-04-23 23:22:38 +0100
commit9e0236016f5d6afd3a73edad183dfb2b02387e98 (patch)
tree5589b5010a1de6eed1650493e812179b84e6e3c6 /nextus/src/ofApp.cpp
parentcdb92d8c8532a287b752a92f1cf0cbf88d52c117 (diff)
many fixes for Nextus show at the complex April 22 2023
Diffstat (limited to 'nextus/src/ofApp.cpp')
-rw-r--r--nextus/src/ofApp.cpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/nextus/src/ofApp.cpp b/nextus/src/ofApp.cpp
index 22e3d11..1964792 100644
--- a/nextus/src/ofApp.cpp
+++ b/nextus/src/ofApp.cpp
@@ -15,7 +15,7 @@ void ofApp::setup(){
load_settings();
- madlaser.setup("madlaser",995,510);
+ madlaser.setup("madlaser",1125,510);
ofSetFrameRate(60);
}
@@ -65,14 +65,27 @@ void ofApp::draw(){
networkinput.draw();
svginput.draw();
textinput.draw();
+ switcher.draw();
//process the pipeline
- vector<colourPolyline> output=textinput.clipOutput();
+ vector<colourPolyline> output;
+ if (switcher.network){
+ vector<colourPolyline> networkoutput=networkinput.clipOutput();
+ output.insert(end(output), begin(networkoutput), end(networkoutput));
+ }
+ if (switcher.svg){
+ vector<colourPolyline> svgoutput=svginput.clipOutput();
+ output.insert(end(output), begin(svgoutput), end(svgoutput));
+ }
+ if (switcher.text){
+ vector<colourPolyline> textoutput=textinput.clipOutput();
+ output.insert(end(output), begin(textoutput), end(textoutput));
+ }
int points=0;
ofPushMatrix();
- ofTranslate(695,5);
+ ofTranslate(825,5);
ofSetColor(255);
ofNoFill();
ofDrawRectangle(0,0,500,500);
@@ -178,11 +191,12 @@ void ofApp::dragEvent(ofDragInfo dragInfo){
string filename= *dragInfo.files.begin();
string extension= filename.substr(filename.find_last_of(".") + 1);
if (extension == "svg") {
- if (filename.find_last_of("fonts")){
- textinput.loadFont(filename);
+ if (string::npos==filename.find("fonts")){
+ svginput.load(filename);
}
else {
- svginput.load(filename);
+ ofLog()<<"found a font";
+ textinput.loadFont(filename);
}
} else if (extension == "txt"){
textinput.loadText(filename);