de.matthiasmann.twl.renderer.lwjgl
Class LWJGLFontCache

java.lang.Object
  extended by de.matthiasmann.twl.renderer.lwjgl.LWJGLFontCache
All Implemented Interfaces:
FontCache, Resource

public class LWJGLFontCache
extends java.lang.Object
implements FontCache

A font render cache - uses display lists


Method Summary
 void destroy()
          After destroying a resurce it is no longer useable.
 void draw(AnimationState as, int x, int y)
          Draw the cached text block at the given coordinates with the given color
 int getHeight()
          Returns the height in pixels of the cached text block
 int getWidth()
          Returns the width in pixels of the cached text block
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

draw

public void draw(AnimationState as,
                 int x,
                 int y)
Description copied from interface: FontCache
Draw the cached text block at the given coordinates with the given color

Specified by:
draw in interface FontCache
Parameters:
as - A time source for animation - may be null
x - the left coordinate
y - the top coordinate

destroy

public void destroy()
Description copied from interface: Resource
After destroying a resurce it is no longer useable.

Specified by:
destroy in interface Resource

getHeight

public int getHeight()
Description copied from interface: FontCache
Returns the height in pixels of the cached text block

Specified by:
getHeight in interface FontCache
Returns:
the height in pixels of the cached text block

getWidth

public int getWidth()
Description copied from interface: FontCache
Returns the width in pixels of the cached text block

Specified by:
getWidth in interface FontCache
Returns:
the width in pixels of the cached text block