com.b3dgs.lionengine.drawable
Interface FontSprite

All Superinterfaces:
Image, Renderable, Sprite

public interface FontSprite
extends Sprite

Allow the use of image based font.


Field Summary
static char NL
          New line char.
 
Method Summary
 void draw(java.awt.Graphics2D g, int x, int y, Alignment align, java.lang.String... text)
          Draw a multiple text at specified location.
 void draw(java.awt.Graphics2D g, int x, int y, Alignment align, java.lang.String text)
          Draw a single text at specified location.
 int getTextHeight(java.lang.String text)
          Get global text height.
 int getTextWidth(java.lang.String text)
          Get global text width.
 void setLineHeight(int height)
          Set line height (default = letter height).
 
Methods inherited from interface com.b3dgs.lionengine.drawable.Sprite
filter, flipHorizontal, flipVertical, getHeightOriginal, getSurface, getWidthOriginal, instanciate, load, rotate, scale, setAlpha, setTransparency, stretch
 
Methods inherited from interface com.b3dgs.lionengine.drawable.Renderable
getHeight, getWidth, render
 

Field Detail

NL

static final char NL
New line char.

See Also:
Constant Field Values
Method Detail

draw

void draw(java.awt.Graphics2D g,
          int x,
          int y,
          Alignment align,
          java.lang.String... text)
Draw a multiple text at specified location.

Parameters:
g - graphics output.
x - location x.
y - location y.
align - alignment.
text - input text.

draw

void draw(java.awt.Graphics2D g,
          int x,
          int y,
          Alignment align,
          java.lang.String text)
Draw a single text at specified location.

Parameters:
g - graphics output.
x - location x.
y - location y.
align - alignment.
text - input text.

getTextWidth

int getTextWidth(java.lang.String text)
Get global text width.

Parameters:
text - input text.
Returns:
text width.

getTextHeight

int getTextHeight(java.lang.String text)
Get global text height.

Parameters:
text - input height.
Returns:
text height.

setLineHeight

void setLineHeight(int height)
Set line height (default = letter height).

Parameters:
height - line height.