diff options
Diffstat (limited to 'nextus/src/vectorPlugin.h')
| -rw-r--r-- | nextus/src/vectorPlugin.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/nextus/src/vectorPlugin.h b/nextus/src/vectorPlugin.h index 00e38aa..047d836 100644 --- a/nextus/src/vectorPlugin.h +++ b/nextus/src/vectorPlugin.h @@ -188,8 +188,9 @@ class textPanel: public vectorPanel{ panel.add(use_beat.set("use beat", false)); panel.add(beat_duration.set("duration factor", 0.5f, 0.0f, 1.0f)); panel.add(text_speed.set("speed", 5.0f, 0.0f, 25.0f)); - panel.add(text_scale.set("scale", 0.1f, 0.0f, 0.5f)); + panel.add(text_scale.set("scale", 0.001f, 0.0f, 0.01f)); panel.add(enable_anim.set("animate", true)); + panel.add(spread_anim.set("spread", true)); panel.add(anim_rev.set("reverse", false)); panel.add(vert_pos.set("vert_pos", 0.0f, -0.3f, 0.3f)); panel.add(vert_spread.set("vert_spread", 0.0f, -0.3f, 0.3f)); @@ -199,7 +200,16 @@ class textPanel: public vectorPanel{ text.update(); } vector<colourPolyline> getLines(){ - vector<colourPolyline> shapes=text.getOutlines(text_scale,STYLE_OVERLAPPING,0,0,enable_anim,anim_rev,vert_spread,use_beat,beat_duration); + vector<colourPolyline> shapes=text.getOutlines( + text_scale, + spread_anim?STYLE_OVERLAPPING:STYLE_SENTENCE, + 0,0, + enable_anim, + anim_rev, + vert_spread, + use_beat, + beat_duration + ); //ofLog()<<"text returned "<<shapes.size()<<" lines"; return shapes; } @@ -209,12 +219,16 @@ class textPanel: public vectorPanel{ void loadPalette(const string & f){ text.loadPalette(f); } + void loadFont(const string & f){ + text.loadFont(f); + } protected: ofParameter<bool> use_beat; ofParameter<float> beat_duration; ofParameter<float> text_speed; ofParameter<float> text_scale; ofParameter<bool> enable_anim; + ofParameter<bool> spread_anim; ofParameter<bool> anim_rev; ofParameter<float> vert_pos; ofParameter<float> vert_spread; |
