b.com/jdf/cue.language">cue.language to remove common words from the text by default, but you can add your own stop words with {@link #withStopWords(String)}.
Weight Your Own Words
If you have some other way to weight your words, you can pass them to {@link #fromWords(Word[])}, and in that case, you can use {@link Word#setColor(int)}, {@link Word#setFont(PFont)}, {@link Word#setAngle(float)}, and/or {@link Word#setPlace(PVector)} tocontrol how any (or all) of your Words are drawn.
Step Two: Style Your Words
There are six questions you have to answer when drawing a word on the WordCram:
How big should it be?
A word can be {@link #sizedByWeight(int,int)}, {@link #sizedByRank(int,int)}, or {@link #withSizer(WordSizer)}
How should it be angled?
It can be {@link #angledAt(float)}, {@link #angledBetween(float,float)}, or {@link #withAngler(WordAngler)}
What font should it be in?
You can render words {@link #withFont(String)} or {@link #withFonts(String)} (those both canalso take PFonts), or {@link #withFonter(WordFonter)}
How should it be colored?
{@link #withColor(int)}, {@link #withColors(int)}, or {@link #withColorer(WordColorer)}
Where on the image should it go?
{@link #withPlacer(WordPlacer)}
If it doesn't fit at first, how should I nudge it?
{@link #withNudger(WordNudger)}
Step Three: Draw Your WordCram
After all that, actually rendering the WordCram is simple. You can repeatedly call {@link #drawNext()} while the WordCram{@link #hasMore()} words to draw (probably once per Processingframe):
void draw() { if (wordCram.hasMore()) { wordCram.drawNext(); } }
Or you can call {@link #drawAll()} once, and let it loop for you:
void draw() { wordCram.drawAll(); }
Step Three-and-a-Half: How Did It Go?
If you're having trouble getting your words to show up, you might want to {@link #getSkippedWords()}. Knowing which words were skipped, and why (see {@link Word#wasSkippedBecause()}), can help you size and place your words better.
You can also {@link #getWords()} to see the whole list, and{@link #getWordAt(float,float)} to see which word covers a given pixel.
@author Dan Bernier