summaryrefslogtreecommitdiff
path: root/nextus/src/vectorText.h
diff options
context:
space:
mode:
Diffstat (limited to 'nextus/src/vectorText.h')
-rw-r--r--nextus/src/vectorText.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/nextus/src/vectorText.h b/nextus/src/vectorText.h
index 153e363..4fac233 100644
--- a/nextus/src/vectorText.h
+++ b/nextus/src/vectorText.h
@@ -313,7 +313,7 @@ public:
}
}
}
- ofLog()<<"update: word "<<theword<<" ,segment "<<segment;
+ //ofLog()<<"update: word "<<theword<<" amount: "<<words[theword].amount;
}
vector<colourPolyline>& 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();
@@ -321,6 +321,10 @@ public:
//if (beat_duration>segment){ //I don't think this is what segment is
// return outlines;
//}
+
+ int drawglyphs=0;
+ int drawlines=0;
+
switch (style){
case STYLE_SENTENCE:{
float p=((-width())/2);
@@ -342,11 +346,13 @@ public:
}
case STYLE_OVERLAPPING:{
for (auto& w:words){
- float p=(w.val*(ofGetWidth()-w.width));
- float v=y+(vert_spread*w.val*(ofGetHeight()));
+ float p=(w.val*(2.0-w.width)); //was screen based now 2.0
+ float v=y+(vert_spread*w.val*(2.0)); //was screen based now 2.0
for (auto& g:w.glyphs){
if (w.amount>0.0f&&g.colour.getBrightness()>0){
+ drawglyphs++;
for (auto& o:g.outline){
+ drawlines++;
auto q=o;
float a=anim?reverse?1.0f-segment:segment:1.0;
q.scale(s*a,-s*a);
@@ -362,7 +368,7 @@ public:
break;
}
}
- ofLog()<<"outlines for "<<words.size()<<" words: "<<outlines.size()<<" lines";
+ //ofLog()<<"outlines for "<<words.size()<<" words: "<<outlines.size()<<" lines, found "<<drawglyphs<<" visible glyphs with "<<drawlines<<" visible lines";
return outlines;
}
}; \ No newline at end of file