de.lessvoid.nifty.elements.render
Class TextRenderer.RenderFontNull

java.lang.Object
  extended by de.lessvoid.nifty.elements.render.TextRenderer.RenderFontNull
All Implemented Interfaces:
RenderFont
Enclosing class:
TextRenderer

public class TextRenderer.RenderFontNull
extends Object
implements RenderFont

RenderFont Null Object.

Author:
void

Constructor Summary
TextRenderer.RenderFontNull()
           
 
Method Summary
 void dispose()
          This RenderFont is not needed anymore.
 Integer getCharacterAdvance(char currentCharacter, char nextCharacter, float size)
          Return the advance of the given character including kerning information.
 int getHeight()
          The height of the font in pixel.
 int getWidth(String text)
          Get width in pixel of given text.
 void render(String text, int x, int y, Color fontColor, float size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextRenderer.RenderFontNull

public TextRenderer.RenderFontNull()
Method Detail

getHeight

public int getHeight()
Description copied from interface: RenderFont
The height of the font in pixel.

Specified by:
getHeight in interface RenderFont
Returns:
font height in pixel.

getWidth

public int getWidth(String text)
Description copied from interface: RenderFont
Get width in pixel of given text.

Specified by:
getWidth in interface RenderFont
Parameters:
text - the text to measure.
Returns:
the pixel width of the given text

render

public void render(String text,
                   int x,
                   int y,
                   Color fontColor,
                   float size)

getCharacterAdvance

public Integer getCharacterAdvance(char currentCharacter,
                                   char nextCharacter,
                                   float size)
Description copied from interface: RenderFont
Return the advance of the given character including kerning information.

Specified by:
getCharacterAdvance in interface RenderFont
Parameters:
currentCharacter - current character
nextCharacter - next character
size - font size
Returns:
width of the character or null when no information for the character is available

dispose

public void dispose()
Description copied from interface: RenderFont
This RenderFont is not needed anymore. You should dispose any resources you allocated for this font.

Specified by:
dispose in interface RenderFont


Copyright © 2011. All Rights Reserved.