Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

text.hpp File Reference

Go to the source code of this file.

Functions

void * GetCurrentFont ()
void SetCurrentFont (void *font)
void SetCurrentFont (int fontid)
int GetFontHeight (void *font)
int GetFontHeight ()
int GetFontHeight (int fontid)
void Text (int x, int y, char *format,...)
void Text3D (float x, float y, float z, char *format,...)


Detailed Description

This file includes some utility routines to draw 2D text on the screen The implementation depends on the glutBitmapCharacter() routine and GLUT fonts.


Function Documentation

void* GetCurrentFont  
 

Return a pointer to the current font to be used in calls to Text() and Text3D().

int GetFontHeight int   fontid
 

Get the height in pixels of the current font.

See also:
GetCurrentFont, GetFontHeight(), GetFontHeight(void*)

int GetFontHeight  
 

Get the height in pixels of the current font.

See also:
GetCurrentFont, GetFontHeight(void*)

int GetFontHeight void *   font
 

Get the height in pixels for a specified font. Needed for calculating the Yoffset to go to the next line.

See also:
GetFontHeight(), GetFontHeight(int)

void SetCurrentFont int   fontid
 

Set the current font. Use a number between 0 and 6, inclusive.

See also:
SetCurrentFont(void*)

void SetCurrentFont void *   font
 

Set the current font. Use one of the GLUT font names: Possible values include:

  • GLUT_BITMAP_8_BY_13
  • GLUT_BITMAP_9_BY_15
  • GLUT_BITMAP_TIMES_ROMAN_10
  • GLUT_BITMAP_TIMES_ROMAN_24
  • GLUT_BITMAP_HELVETICA_10
  • GLUT_BITMAP_HELVETICA_12
  • GLUT_BITMAP_HELVETICA_18
    See also:
    SetCurrentFont(int)

void Text int   x,
int   y,
char *   format,
...  
 

Draw text at the specified 2D location in screen coordinates in the current font. The text will be drawn in the current OpenGL color. The function accepts printf style format specification.

See also:
SetFont, Text3D

void Text3D float   x,
float   y,
float   z,
char *   format,
...  
 

Draw text at the specified 3D raster location. The text will be drawn in the current OpenGL color. The function accepts printf style format specification.

See also:
SetFont, Text


Generated at Fri Oct 12 15:12:22 2001 for GLVU by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001