public class Anglers
extends java.lang.Object
If you want a pretty typical WordAngler, it's probably in here; if you want to know how to build your own WordAngler, you can learn from the source for these.
| Constructor and Description |
|---|
Anglers() |
| Modifier and Type | Method and Description |
|---|---|
static WordAngler |
alwaysUse(float angle)
If you want all your words to be drawn at the same angle, use this.
|
static WordAngler |
heaped() |
static WordAngler |
hexes()
A WordAngler that draws all words at hexagonal angles, or (if you're a
bit more mathy) 0π/6, 1π/6, 2π/6, 3π/6, 4π/6, and 5π/6.
|
static WordAngler |
horiz()
A WordAngler that draws all words horizontally.
|
static WordAngler |
mostlyHoriz()
A WordAngler that draws 5/7 words horizontally, and the rest going up and
down.
|
static WordAngler |
pickFrom(float... angles)
Just like
alwaysUse(float), but it takes multiple angles. |
static WordAngler |
random() |
static WordAngler |
randomBetween(float min,
float max) |
static WordAngler |
upAndDown()
A WordAngler that draws all words vertically, pointing both up and down.
|
public static WordAngler random()
public static WordAngler randomBetween(float min, float max)
min - the lower-bound of the angle rangemax - the upper-bound of the angle rangepublic static WordAngler heaped()
public static WordAngler alwaysUse(float angle)
horiz() is basically implemented as
return alwaysUse(0f);.angle - The angle all words should be rotated at.horiz()public static WordAngler pickFrom(float... angles)
alwaysUse(float), but it takes multiple angles. If you
want all your words to be drawn at the same N angles, pass those angles
to alwaysUse(float). You can pass as many angles as you like.
For example, if you want all your words drawn on 45° and 135°
angles, use Anglers.pickFrom(radians(45), radians(135)).
hexes() is a similar example.
angles - The angles all words should be rotated at.alwaysUse(float),
hexes()public static WordAngler hexes()
It's implemented with pickFrom(float...).
(In retrospect, this is probably not one you'll use very often, so it might not merit a place in Anglers. But whatever.)
pickFrom(float...)public static WordAngler horiz()
alwaysUse(float).public static WordAngler upAndDown()
pickFrom(float...).public static WordAngler mostlyHoriz()
pickFrom(float...).