text

text — Enables capabilities to write some text on rendering screen.

Functions

Types and Values

Description

For the moment, this module is very basic and the only fonts available is the helvetica 12 one. This module is currently broken under Windows.

Functions

VisuGlTextFunc ()

void
(*VisuGlTextFunc) (const gchar *text,
                   VisuGlTextSize size);

A function that render iso8859-1 text at the current raster position.

Parameters

text

the text to render.

 

size

the size for rendering.

 

Since: 3.7


visu_gl_text_setFunc ()

gboolean
visu_gl_text_setFunc (VisuGlTextFunc func);

Set the function to render text at the raster position.

Parameters

func

a VisuGlTextFunc function.

[scope call][allow-none]

Returns

TRUE if the function is indeed changed.

Since: 3.7


visu_gl_text_setFontSize ()

gboolean
visu_gl_text_setFontSize (float size);

Change the normal font size used by V_Sim (see VISU_GL_TEXT_NORMAL). The small font is scaled accordingly. This is working only with the FTGL backend.

Parameters

size

a new size.

 

Returns

TRUE if font size is indeed changed.

Since: 3.7


visu_gl_text_drawChars ()

void
visu_gl_text_drawChars (const gchar *s,
                        VisuGlTextSize size);

Draw the given string on the current raster position with default font.

Parameters

s

a string.

 

size

the size of the text to render.

 

visu_gl_text_initFontList ()

void
visu_gl_text_initFontList ();

Initialise the font drawing with default font (depending on system). It must be called before visu_gl_text_drawChars() and not in a glNewList(). Can be called several times, fonts are initialized once only. Use visu_gl_text_rebuildFontList() to force to build a new font list.


visu_gl_text_rebuildFontList ()

void
visu_gl_text_rebuildFontList ();

Force to buid a new font list (for example new context has changed.


visu_gl_text_onNewContext ()

void
visu_gl_text_onNewContext ();

Set the flag for text list build to FALSE. It will force to rebuild the text lists at next call of visu_gl_text_initFontList().

Since: 3.6


visu_gl_text_putTextWithFTGL ()

void
visu_gl_text_putTextWithFTGL (const gchar *text,
                              VisuGlTextSize size);

A VisuGlTextFunc routine using FTGL to render text with Pixmap lists, see visu_gl_text_setFunc().

Parameters

text

the text to write.

 

size

the size.

 

Since: 3.7

Types and Values

enum VisuGlTextSize

Different text size available in V_Sim.

Members

VISU_GL_TEXT_NORMAL

normal size (14) ;

 

VISU_GL_TEXT_SMALL

small text (12).