|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.ilu.movingletters.MovingLetters
public class MovingLetters
a typeset for moving letters with given size and agility.
| Field Summary | |
|---|---|
private int |
mAgility
agility of the letters |
private Letter[] |
mFont
letter definition |
private int |
mHeight
height for the letters |
private int |
mJitter
number of pixels to randomly move the letters |
private int |
mJitterHalf
number of pixels to randomly move the letters-helper value |
private Letter[] |
mLetters
list of letters indexable by character-values 0-255 |
private int[] |
mPointLocX
list of pixel x-coordinates of the letter coordinates, all relative to letter coordinate 1 |
private int[] |
mPointLocY
list of pixel y-coordinates of the letter coordinates, all relative to letter coordinate 1 |
private processing.core.PApplet |
mRuntime
reference to the processing runtime |
private static int |
NUM_LETTER_COORDINATES
number of letter coordinates |
| Constructor Summary | |
|---|---|
MovingLetters(processing.core.PApplet pRuntime,
int pHeight)
create moving letters with given height and an agility of 1. |
|
MovingLetters(processing.core.PApplet pRuntime,
int pHeight,
int pAgility)
create moving letters with given height and and agility. |
|
MovingLetters(processing.core.PApplet pRuntime,
int pHeight,
int pAgility,
int pJitter)
create moving letters with given height and and agility. |
|
| Method Summary | |
|---|---|
private void |
calcPointLoc(int pMovement)
(re)calculate pixel coordinates for letter coordinates relative to letter coordinate 1. |
(package private) processing.core.PApplet |
getRuntime()
get processing runtime. |
(package private) int |
getX(int pPos)
get a pixel x-coordinate for a letter coordinate. |
(package private) int |
getY(int pPos)
get a pixel y-coordinate for a letter coordinate. |
void |
text(java.lang.String pData,
int pX,
int pY)
draw text at given coordinate. |
void |
text(java.lang.String pData,
int pX,
int pY,
int pDotSize)
draw text at given coordinate. |
void |
text(java.lang.String pData,
int pX,
int pY,
int pDotSize,
int pLineWidth)
draw text at given coordinate. |
void |
text(java.lang.String pData,
int pX,
int pY,
int pDotSize,
int pLineWidth,
int[] pColors)
draw text at given coordinate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int NUM_LETTER_COORDINATES
private Letter[] mFont
private processing.core.PApplet mRuntime
private Letter[] mLetters
private int[] mPointLocX
private int[] mPointLocY
private int mAgility
private int mHeight
private int mJitter
private int mJitterHalf
| Constructor Detail |
|---|
public MovingLetters(processing.core.PApplet pRuntime,
int pHeight)
pRuntime - the reference to the processing runtime.pHeight - wanted height of the letters.
public MovingLetters(processing.core.PApplet pRuntime,
int pHeight,
int pAgility)
pAgility - indicates for how many frames the pixel coordinates of the letter coordinates should kept unchanged.pRuntime - the reference to the processing runtime.pHeight - wanted height of the letters.
public MovingLetters(processing.core.PApplet pRuntime,
int pHeight,
int pAgility,
int pJitter)
pAgility - indicates for how many frames the pixel coordinates of the letter coordinates should kept unchanged.pRuntime - the reference to the processing runtime.pHeight - wanted height of the letters.pJitter - number of pixels to randomly move the edges of the letters. This must be divideable by 2!| Method Detail |
|---|
public void text(java.lang.String pData,
int pX,
int pY)
pData - text string.pX - x-xoordinate for upper left corner of first letter.pY - y-xoordinate for upper left corner of first letter.
public void text(java.lang.String pData,
int pX,
int pY,
int pDotSize)
pData - text string.pX - x-xoordinate for upper left corner of first letter.pY - y-xoordinate for upper left corner of first letter.pDotSize - size of dots to draw at start/end of lines. 0 for no dots.
public void text(java.lang.String pData,
int pX,
int pY,
int pDotSize,
int pLineWidth)
pData - text string.pX - x-xoordinate for upper left corner of first letter.pY - y-xoordinate for upper left corner of first letter.pDotSize - size of dots to draw at start/end of lines. 0 for no dots.pLineWidth - width of the lines for the text.
public void text(java.lang.String pData,
int pX,
int pY,
int pDotSize,
int pLineWidth,
int[] pColors)
pData - text string.pX - x-xoordinate for upper left corner of first letter.pY - y-xoordinate for upper left corner of first letter.pDotSize - size of dots to draw at start/end of lines. 0 for no dots.pLineWidth - width of the lines for the text.pColors - an array of colors which can be used by the #color; syntax.int getX(int pPos)
pPos - letter coordinate.
int getY(int pPos)
pPos - letter coordinate.
private void calcPointLoc(int pMovement)
pMovement - processing.core.PApplet getRuntime()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||