FTGL 2.4.0
Data Structures | Typedefs | Functions
FTGlyph.h File Reference
#include <FTGL/ftgl.h>

Go to the source code of this file.

Data Structures

class  FTGlyph
 FTGlyph is the base class for FTGL glyphs. More...
 

Typedefs

typedef struct _FTGLglyph FTGLglyph
 

Functions

FTGLglyphftglCreateCustomGlyph (FTGLglyph *base, void *data, void(*renderCallback)(FTGLglyph *, void *, FTGL_DOUBLE, FTGL_DOUBLE, int, FTGL_DOUBLE *, FTGL_DOUBLE *), void(*destroyCallback)(FTGLglyph *, void *))
 Create a custom FTGL glyph object.
 
void ftglDestroyGlyph (FTGLglyph *glyph)
 Destroy an FTGL glyph object.
 
void ftglRenderGlyph (FTGLglyph *glyph, FTGL_DOUBLE penx, FTGL_DOUBLE peny, int renderMode, FTGL_DOUBLE *advancex, FTGL_DOUBLE *advancey)
 Render a glyph at the current pen position and compute the corresponding advance.
 
float ftglGetGlyphAdvance (FTGLglyph *glyph)
 Return the advance for a glyph.
 
void ftglGetGlyphBBox (FTGLglyph *glyph, float bounds[6])
 Return the bounding box for a glyph.
 
FT_Error ftglGetGlyphError (FTGLglyph *glyph)
 Query a glyph for errors.
 

Typedef Documentation

◆ FTGLglyph

typedef struct _FTGLglyph FTGLglyph

Definition at line 134 of file FTGlyph.h.

Function Documentation

◆ ftglCreateCustomGlyph()

FTGLglyph * ftglCreateCustomGlyph ( FTGLglyph base,
void *  data,
void(*)(FTGLglyph *, void *, FTGL_DOUBLE, FTGL_DOUBLE, int, FTGL_DOUBLE *, FTGL_DOUBLE *)  renderCallback,
void(*)(FTGLglyph *, void *)  destroyCallback 
)

Create a custom FTGL glyph object.

FIXME: maybe get rid of "base" and have advanceCallback etc. functions

Parameters
baseThe base FTGLglyph* to subclass.
dataA pointer to private data that will be passed to callbacks.
renderCallbackA rendering callback function.
destroyCallbackA callback function to be called upon destruction.
Returns
An FTGLglyph* object.

◆ ftglDestroyGlyph()

void ftglDestroyGlyph ( FTGLglyph glyph)

Destroy an FTGL glyph object.

Parameters
glyphAn FTGLglyph* object.

◆ ftglGetGlyphAdvance()

float ftglGetGlyphAdvance ( FTGLglyph glyph)

Return the advance for a glyph.

Parameters
glyphAn FTGLglyph* object.
Returns
The advance's X component.

◆ ftglGetGlyphBBox()

void ftglGetGlyphBBox ( FTGLglyph glyph,
float  bounds[6] 
)

Return the bounding box for a glyph.

Parameters
glyphAn FTGLglyph* object.
boundsAn array of 6 float values where the bounding box's lower left near and upper right far 3D coordinates will be stored.

◆ ftglGetGlyphError()

FT_Error ftglGetGlyphError ( FTGLglyph glyph)

Query a glyph for errors.

Parameters
glyphAn FTGLglyph* object.
Returns
The current error code.

◆ ftglRenderGlyph()

void ftglRenderGlyph ( FTGLglyph glyph,
FTGL_DOUBLE  penx,
FTGL_DOUBLE  peny,
int  renderMode,
FTGL_DOUBLE advancex,
FTGL_DOUBLE advancey 
)

Render a glyph at the current pen position and compute the corresponding advance.

Parameters
glyphAn FTGLglyph* object.
penxThe current pen's X position.
penyThe current pen's Y position.
renderModeRender mode to display
advancexA pointer to an FTGL_DOUBLE where to write the advance's X component.
advanceyA pointer to an FTGL_DOUBLE where to write the advance's Y component.