agile2d.opengl
Class BasicFontRenderer

java.lang.Object
  |
  +--agile2d.opengl.BasicFontRenderer
Direct Known Subclasses:
OutlineFontRenderer, TextureFontRenderer

public abstract class BasicFontRenderer
extends Object

Basic services for Font renderers.

Version:
$Revision: 1.5 $
Author:
Jean-Daniel Fekete

Field Summary
protected  Font font
           
protected  FontRenderContext frc
           
protected  GlyphVector glyphs
           
protected  boolean installed
           
protected  AffineTransform transform
           
 
Constructor Summary
protected BasicFontRenderer()
           
 
Method Summary
 boolean install(gl4java.drawable.GLDrawable drawable, Font font, double scale, boolean aa, boolean ufm)
          Installs the resources to render the font and return true if the font has been installed or false otherwise.
 boolean isInstalled()
          Returns true if the font is ready to be rendered.
 void release(gl4java.drawable.GLDrawable drawable)
           
abstract  void render(gl4java.drawable.GLDrawable drawable, String string, double scale, Font font)
          Called after install has returned true, this call renders the font on the drawable at the current 0,0 position.
protected  void setup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

font

protected Font font

transform

protected AffineTransform transform

frc

protected FontRenderContext frc

glyphs

protected GlyphVector glyphs

installed

protected boolean installed
Constructor Detail

BasicFontRenderer

protected BasicFontRenderer()
Method Detail

install

public boolean install(gl4java.drawable.GLDrawable drawable,
                       Font font,
                       double scale,
                       boolean aa,
                       boolean ufm)
Installs the resources to render the font and return true if the font has been installed or false otherwise.

Parameters:
drawable - the GLDrawable
scale - the current scane
font - the font
Returns:
true if the font has been installed, false otherwise.

setup

protected void setup()

render

public abstract void render(gl4java.drawable.GLDrawable drawable,
                            String string,
                            double scale,
                            Font font)
Called after install has returned true, this call renders the font on the drawable at the current 0,0 position.

Parameters:
drawable -
string -
scale -
font -

isInstalled

public boolean isInstalled()
Returns true if the font is ready to be rendered.

Returns:
true if the font is ready to be rendered.

release

public void release(gl4java.drawable.GLDrawable drawable)


Copyright © 2002 by University of Maryland, USA All rights reserved.