| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Index]](../keyword_index.gif) | ![[Next]](../next.gif) | 
|  | This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. | 
Draw text within an area
int PgDrawTextArea( char const *ptr,
                    int len,
                    PhRect_t const *rect,
                    int flags );
int PgDrawTextAreaCx( void *dc,
                      char const *ptr,
                      int len,
                      PhRect_t const *rect,
                      int flags );
ph
These functions draw text within an area, using the font specified by a previous call to PgSetFont*(). This area is clipped to the dimensions of the rectangle specified by the PhRect_t structure pointed to by rect.
By default, the text is left-aligned (Pg_TEXT_LEFT), and the text is drawn with its baseline centered inside the drawing area.
The flags can be a combination of:
PgDrawTextArea() works on the current draw context, while you can specify the draw context dc for PgDrawTextAreaCx().
Photon
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
PgDrawTextArea() doesn't work in any context that involves the render library, such as printing or Phindows. If your application needs to use the render library, you should:
PgDrawMultiTextArea*(), PgDrawString*(), PgDrawText*(), PgFlush*(), PgSetFillColor*(), PgSetFillDither*(), PgSetFillTransPat*(), PgSetFont*(), PgSetTextColor*(), PgSetTextDither*(), PgSetTextTransPat*(), PgSetTextXORColor*(), PgSetUnderline(), PhRect_t
"Text" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide
| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Index]](../keyword_index.gif) | ![[Next]](../next.gif) |