Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawstring.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawstring.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawstring.html on line 9

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawstring.html on line 9

PgDrawString(), PgDrawStringv(), PgDrawStringCx(), PgDrawStringCxv()

Draw a string of characters

Synopsis:

int PgDrawString( char const *ptr,
                  PhPoint_t const *pos );

int PgDrawStringv( char const *ptr,
                   PhPoint_t const *pos );

int PgDrawStringCx( void *dc,
                    char const *ptr,
                    PhPoint_t const *pos );

int PgDrawStringCxv( void *dc,
                     char const *ptr,
                     PhPoint_t const *pos );

Library:

ph

Description:

These convenience functions for PgDrawText*() calculate the length of the string internally using strlen(). They then pass the string, along with its length, its position, and a flags setting of 0, to the corresponding text function.


Note: If you call the “v” forms of this function, the data isn't physically copied into the draw buffer. Instead, a pointer to the string is stored until the draw buffer is flushed. Make sure you call PgFlush() before you modify the text.

PgDrawString() and PgDrawStringv() work on the current draw context, while you can specify the draw context dc for PgDrawStringCx() and PgDrawStringCxv().

Returns:

0
Success.
-1
The draw buffer is too small to hold the current draw state, the draw command, and the data. Increase the size of the draw buffer, or decrease the size of the string.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgDrawMultiTextArea*(), PgDrawText*(), PgDrawTextArea*(), PgFlush*(), PgSetFillColor*(), PgSetFillDither*(), PgSetFillTransPat*(), PgSetFont*(), PgSetTextColor*(), PgSetTextDither*(), PgSetTextTransPat*(), PgSetTextXORColor*(), PgSetUnderline*(), PhPoint_t

Text in the Raw Drawing and Animation chapter of the Photon Programmer's Guide

strlen() in the QNX Neutrino Library Reference


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawstring.html on line 156

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawstring.html on line 156