PgSetMultiClip(), PgSetMultiClipCx()

Set a list of rectangles to clip drawing

Synopsis:

int PgSetMultiClip( int num,
                    PhRect_t const *clip_list );

int PgSetMultiClipCx( PhGC_t *gc,
                      int num,
                      PhRect_t const *clip_list );

Library:

ph

Description:

These functions set a list of rectangles (stored in PhRect_t structures) to clip subsequent drawing operations. The rectangles are always relative to the origin of the current region. To disable this clipping, set clip_list to NULL or num to 0.

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


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

This function emits a draw command.

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

Returns:

0
Success.
-1
Unable to allocate enough memory (using malloc()) to store the clipping rectangles.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgSetClipping*(), PgSetUserClip*(), PhRect_t