de.ilu.movingletters
Class Line

java.lang.Object
  extended by de.ilu.movingletters.Line

 class Line
extends java.lang.Object

a line for a letter.

Version:
20071119
Author:
iluvatar

Field Summary
private  int mEnd
          end of line (as index to real coordinates)
private  MovingLetters mMovingLetters
          reference to letters
private  int mStart
          start of line (as index to real coordinates)
 
Constructor Summary
Line(MovingLetters pMovingLetters, int pStart, int pEnd)
          create a line with letter coordinates.
 
Method Summary
(package private)  int getWidth()
          get the width of the line in the letter coordinate space. may be 1, 2 or 3.
(package private)  void paint(int pBaseX, int pBaseY, int pDotSize, int pLineWidth)
          draw this line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mStart

private int mStart
start of line (as index to real coordinates)


mEnd

private int mEnd
end of line (as index to real coordinates)


mMovingLetters

private MovingLetters mMovingLetters
reference to letters

Constructor Detail

Line

Line(MovingLetters pMovingLetters,
     int pStart,
     int pEnd)
create a line with letter coordinates.

Parameters:
pMovingLetters - the reference to the letters instance.
pStart - start of line as letter coordinate.
pEnd - end of line as letter coordinate.
Method Detail

paint

void paint(int pBaseX,
           int pBaseY,
           int pDotSize,
           int pLineWidth)
draw this line.

Parameters:
pBaseX - x-base position of letter coordinate 0.
pBaseY - y-base position of letter coordinate 0.
pDotSize - size of dots at start and end. 0 for no dot.
pLineWidth - line width.

getWidth

int getWidth()
get the width of the line in the letter coordinate space. may be 1, 2 or 3.

Returns:
the width of the line.