From cfd0496ac0ee9120c4bcb6a19ee6dcb2071ebc85 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 19 Apr 2023 20:16:23 +0100 Subject: 2 key texts --- nextus/src/ofApp.cpp | 7 ++++++- nextus/src/vectorPlugin.h | 9 +++++++-- nextus/src/vectorText.h | 6 +++--- 3 files changed, 16 insertions(+), 6 deletions(-) (limited to 'nextus') diff --git a/nextus/src/ofApp.cpp b/nextus/src/ofApp.cpp index 4a955a5..fa6a76b 100644 --- a/nextus/src/ofApp.cpp +++ b/nextus/src/ofApp.cpp @@ -66,7 +66,9 @@ void ofApp::draw(){ textinput.draw(); //process the pipeline - vector output=svginput.getOutput(); + vector output=textinput.getOutput(); + + int points=0; ofPushMatrix(); ofTranslate(695,5); @@ -77,12 +79,15 @@ void ofApp::draw(){ ofScale(250.0f); for (auto poly:output){ poly.draw(); + points+=poly.size(); } ofPopMatrix(); madlaser.panel.draw(); madlaser.drawNormalised(output); + + ofSetWindowTitle("laser points: "+ofToString(points)); } diff --git a/nextus/src/vectorPlugin.h b/nextus/src/vectorPlugin.h index ff13b65..55027c9 100644 --- a/nextus/src/vectorPlugin.h +++ b/nextus/src/vectorPlugin.h @@ -194,10 +194,15 @@ class textPanel: public vectorPanel{ 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)); } + void update(){ + text.update(); + } vector getLines(){ - return text.getOutlines(text_scale,STYLE_OVERLAPPING,x,y+(ofGetHeight()*vert_pos),enable_anim,anim_rev,vert_spread,use_beat,beat_duration); + vector shapes=text.getOutlines(text_scale,STYLE_OVERLAPPING,0,0,enable_anim,anim_rev,vert_spread,use_beat,beat_duration); + //ofLog()<<"text returned "<& getOutlines(float s=1.0f,int style=STYLE_SENTENCE,float x=0,float y=0,bool anim=false,bool reverse=false, float vert_spread=0.0f, bool use_beat=false, float beat_duration=0.0f){ outlines.clear(); - if (beat_duration>segment){ //I don't think this is what segment is - return outlines; - } + //if (beat_duration>segment){ //I don't think this is what segment is + // return outlines; + //} switch (style){ case STYLE_SENTENCE:{ float p=((-width())/2); -- cgit v1.2.3