Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RtCharset
[2d Tools]


Data Structures

struct   RtCharsetDesc

Typedefs

typedef RwRaster  RtCharset

Functions

RwBool  RtCharsetBufferFlush (void)
RtCharset RtCharsetPrintBuffered (RtCharset *charSet, const RwChar *string, RwInt32 x, RwInt32 y, RwBool hideSpaces)
RtCharset RtCharsetPrint (RtCharset *charSet, const RwChar *string, RwInt32 x, RwInt32 y)
RtCharset RtCharsetGetDesc (RtCharset *charset, RtCharsetDesc *desc)
RtCharset RtCharsetSetColors (RtCharset *charSet, const RwRGBA *foreGround, const RwRGBA *backGround)
RwBool  RtCharsetDestroy (RtCharset *charSet)
RtCharset RtCharsetCreate (const RwRGBA *foreGround, const RwRGBA *backGround)
void  RtCharsetClose (void)
RwBool  RtCharsetOpen (void)

Detailed Description

Character Set/Foot Toolkit for RenderWare.

RtCharset Toolkit Overview

Requirements

Overview

RtCharset provides a simple, low-overhead text display Toolkit.

RtCharset provides very fast, highly-optimized support for displaying text messages and is often used for displaying in-vision debugging and diagnostic messages during development.


Typedef Documentation

typedef RwRaster RtCharset
 

RtCharset typedef for a structure defining a character set (opaque).

See also:
RtCharsetCreate

Function Documentation

RwBool RtCharsetBufferFlush void   
 

RtCharsetBufferFlush is used to display all previously buffered strings

RtCharsetPrintBuffered is used to buffer up strings for display.

is called automatically when the buffer is filled or when the charset in use is changed.

RtCharsetOpen must be called before this function is used. Also, the include file rtcharse.h and the library file rtcharse.lib are required to use this function.

Returns:
Returns TRUE if successful or FALSE if there is an error
See also:
RtCharsetPrintBuffered , RtCharsetOpen , RtCharsetClose , RtCharsetCreate , RtCharsetDestroy , RtCharsetGetDesc , RtCharsetSetColors , RwCameraBeginUpdate , RwCameraEndUpdate
void RtCharsetClose void   
 

RtCharsetClose is used to close the charset toolkit.

This function should be called after any other charset functions; strictly speaking it is only required if RtCharsetOpen has been called.

The include file rtcharse.h and the library file rtcharse.lib are required to use this function.

See also:
RtCharsetOpen , RtCharsetPrintBuffered , RtCharsetBufferFlush , RtCharsetCreate , RtCharsetDestroy , RtCharsetPrint , RtCharsetGetDesc
RtCharset* RtCharsetCreate const RwRGBA   foreGround,
const RwRGBA   backGround
 

RtCharsetCreate is used to create a character set for displaying text on RenderWare rasters with the specified foreground and background colors. The foreground color specifies the color of the text lettering while the background specifies the color outside of the text lettering.

The include file rtcharse.h and the library file rtcharse.lib are required to use this function.

Parameters:
foreGround  Pointer to a RwRGBA value equal to the foreground color.
backGround  Pointer to a RwRGBA value equal to the background color.
Returns:
Returns a pointer to the new raster character set if successful or NULL if there is an error.
See also:
RtCharsetOpen , RtCharsetClose , RtCharsetPrintBuffered , RtCharsetBufferFlush , RtCharsetDestroy , RtCharsetSetColors , RtCharsetPrint , RtCharsetGetDesc
RwBool RtCharsetDestroy RtCharset   charSet
 

RtCharsetDestroy is used to destroy the specified raster character set.

The include file rtcharse.h and the library file rtcharse.lib are required to use this function.

Parameters:
charSet  Pointer to the raster character set.
Returns:
Returns TRUE if successful or FALSE if there is an error
See also:
RtCharsetOpen , RtCharsetClose , RtCharsetPrintBuffered , RtCharsetBufferFlush , RtCharsetCreate , RtCharsetSetColors , RtCharsetPrint
RtCharset* RtCharsetGetDesc RtCharset   charset,
RtCharsetDesc   desc
 

RtCharsetGetDesc is used to retrieve RtCharsetDesc information about the specified raster character set. This includes the pixel-size of each character and the number of characters in the set.

The include file rtcharse.h and the library file rtcharse.lib are required to use this function.

Parameters:
charset  Pointer to the raster character set.
desc  Pointer to an RtCharsetDesc that will receive the information.
Returns:
Returns a pointer to the raster charster set if successful or NULL if there is an error.
See also:
RtCharsetOpen , RtCharsetClose , RtCharsetPrintBuffered , RtCharsetBufferFlush , RtCharsetCreate , RtCharsetPrint
RwBool RtCharsetOpen void   
 

RtCharsetOpen is used to open the charset toolkit.

This function should be called before any other charset functions (strictly speaking it is only required for buffered string printing).

The include file rtcharse.h and the library file rtcharse.lib are required to use this function.

Returns:
Returns TRUE if successful or FALSE if there is an error
See also:
RtCharsetClose , RtCharsetPrintBuffered , RtCharsetBufferFlush , RtCharsetCreate , RtCharsetDestroy , RtCharsetPrint , RtCharsetGetDesc
RtCharset* RtCharsetPrint RtCharset   charSet,
const RwChar   string,
RwInt32    x,
RwInt32    y
 

RtCharsetPrint is used to display the text in the given string on the current raster using the specified character set. The top-left position of the string is specified by the x- and y-coordinates on the current raster.

The width_internal and height_internal of a character (obtained by using the API function RtCharsetGetDesc) may be used in conjunction with the string length to determine precise text positioning if required.

Please note: RtCharsetPrint now uses immediate mode triangles to keep the speed up. It is no longer required to wrap calls to this function between RwRasterPushContext and RwRasterPopContext functions. Instead, calls to RtCharsetPrint should be placed between RwCameraBeginUpdate and RwCameraEndUpdate calls.

The include file rtcharse.h and the library file rtcharse.lib are required to use this function.

Parameters:
charSet  Pointer to the raster character set.
string  Pointer to a string containing the characters to print.
x  A RwInt32 value equal to the x-coordinate.
y  A RwInt32 value equal to the y-coordinate.
Returns:
Returns a pointer to the raster character set if successful or NULL if there is an error.
See also:
RtCharsetOpen , RtCharsetClose , RtCharsetPrintBuffered , RtCharsetBufferFlush , RtCharsetCreate , RtCharsetDestroy , RtCharsetGetDesc , RtCharsetSetColors , RwCameraBeginUpdate , RwCameraEndUpdate
RtCharset* RtCharsetPrintBuffered RtCharset   charSet,
const RwChar   string,
RwInt32    x,
RwInt32    y,
RwBool    hideSpaces
 

RtCharsetPrintBuffered is used to buffer a string to be printed.

This function is similar to RtCharsetPrint and takes the same set of parameters. The difference is that this function buffers a string for display later. If several strings are buffered before display then the speed of display will be quicker overall (the difference between displaying one buffer for a screen and displaying each word or even character at a time is huge).

To display strings after buffering them, call RtCharsetBufferFlush.

RtCharsetOpen must be called before this function is used. Also, the include file rtcharse.h and the library file rtcharse.lib are required to use this function.

Parameters:
charSet  Pointer to the raster character set.
string  Pointer to a string containing the characters to buffer.
x  A RwInt32 value equal to the x-coordinate.
y  A RwInt32 value equal to the y-coordinate.
hideSpaces  A RwBool specifying whether to hide spaces or not (TRUE = yes)
Returns:
Returns a pointer to the raster character set if successful or NULL if there is an error.
See also:
RtCharsetBufferFlush , RtCharsetOpen , RtCharsetClose , RtCharsetCreate , RtCharsetDestroy , RtCharsetGetDesc , RtCharsetSetColors , RwCameraBeginUpdate , RwCameraEndUpdate
RtCharset* RtCharsetSetColors RtCharset   charSet,
const RwRGBA   foreGround,
const RwRGBA   backGround
 

RtCharsetSetColors is used to redefine the foreground and background colors of the specified raster character set using the given colors. The foreground color specifies the color of the text lettering while the background specifies the color outside of the text lettering.

This function changes the color of the character set rather than the text. This implies that all text rendered with the character set will be changed to use the new set of colors. This includes any text rendered before the function was called.

The include file rtcharse.h and the library file rtcharse.lib are required to use this function.

Parameters:
charSet  Pointer to the raster character set.
foreGround  Pointer to a RwRGBA value equal to the foreground color.
backGround  Pointer to a RwRGBA value equal to the background color.
Returns:
Returns a pointer to the raster character set if successful or NULL if there is an error.
See also:
RtCharsetOpen , RtCharsetClose , RtCharsetPrintBuffered , RtCharsetBufferFlush , RtCharsetCreate , RtCharsetDestroy , RtCharsetPrint , RtCharsetGetDesc

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:53 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)