ProcessViewBrowser-ServerProgramming
Data Structures | Public Member Functions | Private Attributes
glFont Class Reference

#include <processviewserver.h>

Data Structures

struct  Glyph
 

Public Member Functions

 glFont ()
 
 ~glFont ()
 
int read (const char *filename)
 
int lineHeight ()
 
int charWidth (unsigned char c)
 
int stringWidth (const char *str)
 
void drawString (float x, float y, const char *str)
 
void setZoom (float factor)
 
void setRotation (int angle)
 
void setFontSize (int pitch, float factor)
 

Private Attributes

Glyph _glyphs [256]
 
Glyph_table [256]
 
GLuint _line_height
 
GLuint _texture
 
float _tex_line_height
 
double zoom
 
double zoom0
 
int angle_128x128
 

Detailed Description

// This class is for reading a font for use within OpenGL 
// 

Constructor & Destructor Documentation

◆ glFont()

glFont::glFont ( )

◆ ~glFont()

glFont::~glFont ( )

Member Function Documentation

◆ charWidth()

int glFont::charWidth ( unsigned char  c)
get width of a character

◆ drawString()

void glFont::drawString ( float  x,
float  y,
const char *  str 
)
draw string at position x,y
push matrix, translate and rotate first if you want to place it in 3D

◆ lineHeight()

int glFont::lineHeight ( )
get lineHeight

◆ read()

int glFont::read ( const char *  filename)
read font file

◆ setFontSize()

void glFont::setFontSize ( int  pitch,
float  factor 
)
for internal use only.

◆ setRotation()

void glFont::setRotation ( int  angle)
rotate font in degree angle.

◆ setZoom()

void glFont::setZoom ( float  factor)
zoom all texts. default: zoom=1.0

◆ stringWidth()

int glFont::stringWidth ( const char *  str)
get width of string

Field Documentation

◆ _glyphs

Glyph glFont::_glyphs[256]
private

◆ _line_height

GLuint glFont::_line_height
private

◆ _table

Glyph* glFont::_table[256]
private

◆ _tex_line_height

float glFont::_tex_line_height
private

◆ _texture

GLuint glFont::_texture
private

◆ angle_128x128

int glFont::angle_128x128
private

◆ zoom

double glFont::zoom
private

◆ zoom0

double glFont::zoom0
private

The documentation for this class was generated from the following file: