org.dronus.gl.GLFont Class Reference

Collaboration diagram for org.dronus.gl.GLFont:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void render ()
void print (String msg)
 GLFont (String fontName)
float getLineLength (String text)
void finalize () throws Throwable

Static Public Member Functions

static GLFont getDefault ()

Package Functions

BufferedImage buildBitmap (String fontName)
int buildChars ()

Package Attributes

String fontName
final int N = 16
final int NUM_LETTERS = 256
int resolution = 64
int chars
float[] charwidth = new float[NUM_LETTERS]
Texture texture

Static Package Attributes

static final Color OPAQUE_WHITE = Color.WHITE
static final Color TRANSPARENT_WHITE = new Color(1, 1, 1, 0)

Static Private Attributes

static GLFont def

Detailed Description

allows for GL text rendering. raterizes a system font to obtain a character texture.

can build GL display lists from Strings for fast text rendering.

contains functions for an convenient 2d fullscreen overlay.

Author:
paul

Definition at line 24 of file GLFont.java.


Constructor & Destructor Documentation

org.dronus.gl.GLFont.GLFont ( String  fontName  ) 

readys a new GLFont. rasterizing the first 256 letters, this may take a "while".

Definition at line 73 of file GLFont.java.

References org.dronus.gl.GLFont.buildBitmap(), org.dronus.gl.GLFont.buildChars(), org.dronus.gl.GLFont.chars, and org.dronus.gl.GLFont.texture.

Referenced by org.dronus.gl.GLFont.getDefault().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

static GLFont org.dronus.gl.GLFont.getDefault (  )  [static]

Definition at line 41 of file GLFont.java.

References org.dronus.gl.GLFont.def, org.dronus.gl.GLFont.fontName, and org.dronus.gl.GLFont.GLFont().

Here is the call graph for this function:

void org.dronus.gl.GLFont.render (  ) 

Definition at line 47 of file GLFont.java.

References org.dronus.gl.Texture.render(), and org.dronus.gl.GLFont.texture.

Referenced by org.dronus.gl.GLTextPanel.GLTextPanel(), and org.dronus.gl.GLTextOverlay.render().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.dronus.gl.GLFont.print ( String  msg  ) 

Definition at line 51 of file GLFont.java.

References org.dronus.gl.GLFont.chars, and org.dronus.gl.GLFont.charwidth.

Referenced by org.dronus.gl.GLTextOverlay.render().

Here is the caller graph for this function:

BufferedImage org.dronus.gl.GLFont.buildBitmap ( String  fontName  )  [package]

generate a bitmap texture containing the rasterisation of the first 256 characters of given font.

Parameters:
fontName name of the font
Returns:
Texture containing an N*N array of letters

Definition at line 86 of file GLFont.java.

References org.dronus.gl.GLFont.charwidth, org.dronus.gl.GLFont.N, org.dronus.gl.GLFont.OPAQUE_WHITE, org.dronus.gl.GLFont.resolution, and org.dronus.gl.GLFont.TRANSPARENT_WHITE.

Referenced by org.dronus.gl.GLFont.GLFont().

Here is the caller graph for this function:

int org.dronus.gl.GLFont.buildChars (  )  [package]

Generate display lists, one for each character in the standard/extended ASCII chart.

Definition at line 146 of file GLFont.java.

References org.dronus.gl.GLFont.charwidth, org.dronus.gl.GLFont.N, and org.dronus.gl.GLFont.NUM_LETTERS.

Referenced by org.dronus.gl.GLFont.GLFont().

Here is the caller graph for this function:

float org.dronus.gl.GLFont.getLineLength ( String  text  ) 

Returns:
the unit length of given string

Definition at line 174 of file GLFont.java.

References org.dronus.gl.GLFont.charwidth.

void org.dronus.gl.GLFont.finalize (  )  throws Throwable

Definition at line 184 of file GLFont.java.

References org.dronus.gl.GLFont.chars, and org.dronus.gl.GLFont.NUM_LETTERS.


Member Data Documentation

GLFont org.dronus.gl.GLFont.def [static, private]

Definition at line 25 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.getDefault().

String org.dronus.gl.GLFont.fontName [package]

Definition at line 27 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.getDefault().

final int org.dronus.gl.GLFont.N = 16 [package]

Definition at line 29 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.buildBitmap(), org.dronus.gl.GLFont.buildChars(), and org.dronus.gl.GLTextPanel.GLTextPanel().

final int org.dronus.gl.GLFont.NUM_LETTERS = 256 [package]

Definition at line 29 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.buildChars(), and org.dronus.gl.GLFont.finalize().

int org.dronus.gl.GLFont.resolution = 64 [package]

Definition at line 31 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.buildBitmap().

int org.dronus.gl.GLFont.chars [package]

Definition at line 33 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.finalize(), org.dronus.gl.GLFont.GLFont(), and org.dronus.gl.GLFont.print().

float [] org.dronus.gl.GLFont.charwidth = new float[NUM_LETTERS] [package]

Definition at line 34 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.buildBitmap(), org.dronus.gl.GLFont.buildChars(), org.dronus.gl.GLFont.getLineLength(), org.dronus.gl.GLTextPanel.GLTextPanel(), org.dronus.gl.GLTextPanel.LineIterator.nextLine(), and org.dronus.gl.GLFont.print().

Texture org.dronus.gl.GLFont.texture [package]

Definition at line 36 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.GLFont(), and org.dronus.gl.GLFont.render().

final Color org.dronus.gl.GLFont.OPAQUE_WHITE = Color.WHITE [static, package]

Definition at line 38 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.buildBitmap().

final Color org.dronus.gl.GLFont.TRANSPARENT_WHITE = new Color(1, 1, 1, 0) [static, package]

Definition at line 38 of file GLFont.java.

Referenced by org.dronus.gl.GLFont.buildBitmap().


The documentation for this class was generated from the following file:
Generated on Tue Apr 7 17:57:33 2009 for visclient by  doxygen 1.5.1