torque Torque Game Engine Documentation
TGE Version 1.5.2

Text Functions


Detailed Description

These functions draw a string on the string with a given font.


Functions

U32 dglDrawText (const GFont *font, const Point2I &ptDraw, const UTF16 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Draws text at a location in 2d gui coordinates Also supports color tags to modulate the given text.
U32 dglDrawText (const GFont *font, const Point2I &ptDraw, const UTF8 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawText.
U32 dglDrawTextN (const GFont *font, const Point2I &ptDraw, const UTF16 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Draws "n" number of characters from the string, in_string.
U32 dglDrawTextN (const GFont *font, const Point2I &ptDraw, const UTF8 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawTextN.


Function Documentation

U32 dglDrawText ( const GFont font,
const Point2I ptDraw,
const UTF16 in_string,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

Draws text at a location in 2d gui coordinates Also supports color tags to modulate the given text.

Returns:
the number of x-pixels traversed
Parameters:
font font to draw with, usually found in the profile
ptDraw point where to start drawing text
in_string string to be drawn
colorTable lookups for the color tags
maxColorIndex size of the colorTable
rot rotation of text

U32 dglDrawText ( const GFont font,
const Point2I ptDraw,
const UTF8 in_string,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawText.

U32 dglDrawTextN ( const GFont font,
const Point2I ptDraw,
const UTF16 in_string,
U32  n,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

Draws "n" number of characters from the string, in_string.

Returns:
the number of x-pixels traversed
See also:
dglDrawText

U32 dglDrawTextN ( const GFont font,
const Point2I ptDraw,
const UTF8 in_string,
U32  n,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawTextN.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen