diff options
Diffstat (limited to 'nextus/src/vectorText.h')
| -rw-r--r-- | nextus/src/vectorText.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nextus/src/vectorText.h b/nextus/src/vectorText.h index 4fb7520..91ff3c7 100644 --- a/nextus/src/vectorText.h +++ b/nextus/src/vectorText.h @@ -169,8 +169,8 @@ public: void loadPalette(string path){ ofxXmlSettings xml; if (xml.load(path)){ - ofLog()<<path<<": found palette, "<<xml.getNumTags("colour")<<" colours"; vector<ofColor> palette; + ofLog()<<"loading palette "<<path<<" with "<<xml.getNumTags("colour")<<" colour tags"; for (int i=0;i<xml.getNumTags("colour");i++){ string s=xml.getValue("colour","", i); try { @@ -181,7 +181,10 @@ public: ofLog()<<"palette loader: could not convert "<<s; } } - if (palette.size()) loadPalette(palette); + if (palette.size()) { + ofLog()<<"colours found: "<<palette.size(); + loadPalette(palette); + } } else { ofLog()<<"could not load palette "<<path; @@ -265,7 +268,7 @@ public: } } void clear(){words.clear();} - void update(float speed=1.0f,bool usePalette=false,bool use_beat=false,int onset_frame=0){ + void update(float speed=1.0f,bool use_beat=false,int onset_frame=0){ if (!words.size()) return; @@ -308,7 +311,7 @@ public: for (auto& g:words[i].glyphs){ if (ofRandom(100)<speed) { g.colour= - usePalette? + palette.size()? palette[ofRandom(palette.size())]: ofColor::fromHsb(ofRandom(119)+112,ofRandom(255),255); } |
