summaryrefslogtreecommitdiff
path: root/nextus/src
diff options
context:
space:
mode:
Diffstat (limited to 'nextus/src')
-rw-r--r--nextus/src/ofApp.cpp4
-rw-r--r--nextus/src/vectorPlugin.h9
2 files changed, 11 insertions, 2 deletions
diff --git a/nextus/src/ofApp.cpp b/nextus/src/ofApp.cpp
index 048a128..4a955a5 100644
--- a/nextus/src/ofApp.cpp
+++ b/nextus/src/ofApp.cpp
@@ -173,6 +173,10 @@ void ofApp::dragEvent(ofDragInfo dragInfo){
string extension= filename.substr(filename.find_last_of(".") + 1);
if (extension == "svg") {
svginput.load(filename);
+ } else if (extension == "txt"){
+ textinput.loadText(filename);
+ } else if (extension == "plt"){
+ textinput.loadPalette(filename);
} else {
ofLog()<<"cannot load "<<filename;
}
diff --git a/nextus/src/vectorPlugin.h b/nextus/src/vectorPlugin.h
index d772b0b..ff13b65 100644
--- a/nextus/src/vectorPlugin.h
+++ b/nextus/src/vectorPlugin.h
@@ -195,9 +195,14 @@ class textPanel: public vectorPanel{
panel.add(vert_spread.set("vert_spread", 0.0f, -0.3f, 0.3f));
}
vector<colourPolyline> getLines(){
- vector<colourPolyline> output;
- return output;
+ return text.getOutlines(text_scale,STYLE_OVERLAPPING,x,y+(ofGetHeight()*vert_pos),enable_anim,anim_rev,vert_spread,use_beat,beat_duration);
}
+ void loadPext(const string & f){
+ text.load(f);
+ }
+ void loadPalette(const string & f){
+ text.loadPalette(f);
+ }
protected:
ofParameter<bool> use_beat;
ofParameter<float> beat_duration;