[Previous] [Contents] [Index] [Next]

PgCreateGC()

Allocate a graphics context

Synopsis:

PhGC_t *PgCreateGC( int size );

Description:

This function allocates a graphics context, and can optionally allocate a draw buffer to be used with that graphics context. A graphics context contains the entire draw state, including color, clipping, and current region.


Note: If your application calls both Pg and Pt functions, you must provide one graphics context for the Pg functions and a separate context for the Pt functions. To do this, call PgSetGC() every time you switch from one API to the other.

To use the global draw buffer, set size to 0.

Returns:

A pointer to a graphics context, or NULL if an error occurs.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgDestroyGC(), PgSetDrawBufferSize(), PgSetGC()


[Previous] [Contents] [Index] [Next]