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/pgflush.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/pgflush.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/pgflush.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/pgflush.html on line 9

PgFlush(), PgFFlush(), PgFlushCx(), PgFFlushCx()

Explicitly flush the current draw buffer

Synopsis:

int PgFlush( void );

int PgFFlush( unsigned int flags );

int PgFlushCx( void *dc );

int PgFFlushCx( void *dc,
                unsigned int flags );

Library:

ph

Description:

These functions flush the current draw buffer and then clear it. Most applications call PgFlush*(); you need to call PgFFlush*() only if you need to specify the type of draw event.

Normally, you set flags to Ph_NORMAL_DRAW; this is the same as calling PgFlush*(). But if your application has received an expose event with a subtype of Ph_CAPTURE_EXPOSE, you should encapsulate your drawing events by calling

PgFFlush( Ph_START_DRAW );

before drawing anything, and

PgFFlush( Ph_DONE_DRAW );

after the entire exposed region has been redrawn. If you're using widgets, PtEventHandler() makes both these calls automatically.

Any function that builds a command in the draw buffer calls PgFlush*() automatically when the draw buffer becomes full.

PgFlush() and PgFFlush() work on the current draw context, while you can specify the draw context dc for PgFlushCx() and PgFFlushCx().

Returns:

0
Successful completion.
-1
An error occurred.

Examples:

/*
 * Place a group of 3 lines in the draw buffer
 */
PgDrawILine( 100, 100, 200, 300 );
PgDrawILine( 200, 300, 700, 700 );
PgDrawILine( 700, 700, 0,   0   );

/*
 * Emit a draw event that contains those 3 lines
 */
PgFlush();

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgClearDrawBuffer*(), PgSetDrawBufferSize*(), PhEvent_t


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/pgflush.html on line 165

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/pgflush.html on line 165