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/pgsetclipping.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/pgsetclipping.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/pgsetclipping.html on line 8

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/pgsetclipping.html on line 8

PgSetClipping(), PgSetClippingCx()

Limit the extent of drawing

Synopsis:

void PgSetClipping( unsigned short n,
                    PhRect_t const *rects );

void PgSetClippingCx( PhGC_t *gc,
                      unsigned short n,
                      PhRect_t const *rects );

Library:

ph

Description:

These functions let you limit the extent of drawing by specifying which rectangles to draw in. Note that you can never draw outside of the current region.

PgSetClipping() works on the current graphics context, while you can specify the graphics context gc for PgSetClippingCx().

The n argument contains the number of clip rectangles; rects is an array of n clip rectangles, relative to the origin of the current region. To reset the clipping rectangle to the full size of the region, you should pass 0 rectangles.

All subsequent draws will be clipped to the intersection of the clipping rectangles set by PgSetClipping*(), PgSetMultiClip*(), and PgSetUserClip*(), and PgSetRegion*().


Note: PhAttach(), PhReattach(), and PgSetRegion*() reset the clipping rectangle to the full size of the region.

Don't call PgSetClipping*() in a widget's draw function; use PgSetMultiClip*(), PtClipAdd(), and PtClipRemove() instead.


This function flushes the draw buffer.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgFlush*(), PgSetMultiClip*(), PgSetRegion*(), PgSetUserClip*(), PhAttach(), PhReattach() PhRect_t, PtClipAdd(), PtClipRemove()


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/pgsetclipping.html on line 139

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/pgsetclipping.html on line 139