|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.ilu.movingletters.Letter
class Letter
a letter in the typeset. Letters consist of 15 possible locations (letter coordinates) numbered from top left (1) to bootom
right (15).
e.g. the letter A consists of the 4 lines:
1-3, 7-9, 1-13, 3-15
01 02 03
04 05 06
07 08 09
10 11 12
13 14 15
| Field Summary | |
|---|---|
private Line[] |
mLines
the lines for this letter |
private int |
mLineWidth
the width of the letter in letter coordinates |
private int |
mPixelWidth
the width of the letter in pixel |
private char |
mValue
the char represented by this letter |
| Constructor Summary | |
|---|---|
Letter(MovingLetters pMovingLetters,
char pChar,
int[][] pLineDef)
create a letter from it's line description. |
|
| Method Summary | |
|---|---|
(package private) void |
calculatePixelWidth(int pHeight)
calculate the width of the letter in pixel. must be called prior to all drawing operations. |
(package private) int |
getPixelWidth()
get width of the letter in pixel. |
(package private) char |
getValue()
get the char represented by this letter. |
(package private) void |
paint(int pBaseX,
int pBaseY,
int pDotSize,
int pLineWidth)
draw the letter. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Line[] mLines
private int mLineWidth
private int mPixelWidth
private char mValue
| Constructor Detail |
|---|
public Letter(MovingLetters pMovingLetters,
char pChar,
int[][] pLineDef)
pMovingLetters - reference to the typeset containing this letter.pChar - the char represented by this letterpLineDef - the line definition as list of start/end letter coordinates.| Method Detail |
|---|
void calculatePixelWidth(int pHeight)
pHeight - the wanted height of the letter.int getPixelWidth()
char getValue()
void paint(int pBaseX,
int pBaseY,
int pDotSize,
int pLineWidth)
pBaseX - x-base coordinate for the letter coordinate 1.pBaseY - y-base coordinate for the letter coordinate 1.pDotSize - size of dots at start and end. 0 for no dot.pLineWidth - line width.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||